Fixed .poll and .pollend
This commit is contained in:
@ -39,7 +39,7 @@ namespace NadekoBot.Modules.Games
|
||||
|
||||
private async Task InternalStartPoll(string arg)
|
||||
{
|
||||
if(await _service.StartPoll(Context.Channel.Id, Context.Message, arg) == false)
|
||||
if(await _service.StartPoll(Context.Guild.Id, Context.Message, arg) == false)
|
||||
await ReplyErrorLocalized("poll_already_running").ConfigureAwait(false);
|
||||
}
|
||||
|
||||
@ -50,8 +50,8 @@ namespace NadekoBot.Modules.Games
|
||||
{
|
||||
var channel = (ITextChannel)Context.Channel;
|
||||
|
||||
_service.ActivePolls.TryRemove(channel.Guild.Id, out var poll);
|
||||
await poll.StopPoll().ConfigureAwait(false);
|
||||
if(_service.ActivePolls.TryRemove(channel.Guild.Id, out var poll))
|
||||
await poll.StopPoll().ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user