poll is now public poll, private poll removed
This commit is contained in:
@ -26,13 +26,7 @@ namespace NadekoBot.Modules.Games
|
||||
[RequireUserPermission(GuildPermission.ManageMessages)]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public Task Poll([Remainder] string arg = null)
|
||||
=> InternalStartPoll(arg, false);
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
[RequireUserPermission(GuildPermission.ManageMessages)]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public Task PublicPoll([Remainder] string arg = null)
|
||||
=> InternalStartPoll(arg, true);
|
||||
=> InternalStartPoll(arg);
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
[RequireUserPermission(GuildPermission.ManageMessages)]
|
||||
@ -44,15 +38,10 @@ namespace NadekoBot.Modules.Games
|
||||
|
||||
await Context.Channel.EmbedAsync(poll.GetStats(GetText("current_poll_results")));
|
||||
}
|
||||
//todo enable private polls, or completely remove them
|
||||
private async Task InternalStartPoll(string arg, bool isPublic = false)
|
||||
|
||||
private async Task InternalStartPoll(string arg)
|
||||
{
|
||||
if (isPublic == false)
|
||||
{
|
||||
await ReplyErrorLocalized($"Temporarily disabled. Use `{Prefix}ppoll`");
|
||||
return;
|
||||
}
|
||||
if(await _polls.StartPoll((ITextChannel)Context.Channel, Context.Message, arg, isPublic) == false)
|
||||
if(await _polls.StartPoll((ITextChannel)Context.Channel, Context.Message, arg) == false)
|
||||
await ReplyErrorLocalized("poll_already_running").ConfigureAwait(false);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user