2017-06-12 12:26:14 +00:00
|
|
|
|
using Discord.Commands;
|
|
|
|
|
using System.Threading.Tasks;
|
2017-07-17 19:42:36 +00:00
|
|
|
|
using NadekoBot.Common.Attributes;
|
|
|
|
|
using NadekoBot.Modules.Utility.Services;
|
2017-06-12 12:26:14 +00:00
|
|
|
|
|
|
|
|
|
namespace NadekoBot.Modules.Utility
|
|
|
|
|
{
|
|
|
|
|
public partial class Utility
|
|
|
|
|
{
|
|
|
|
|
[Group]
|
2017-07-17 19:42:36 +00:00
|
|
|
|
public class VerboseErrorCommands : NadekoSubmodule<VerboseErrorsService>
|
2017-06-12 12:26:14 +00:00
|
|
|
|
{
|
|
|
|
|
[NadekoCommand, Usage, Description, Aliases]
|
|
|
|
|
[RequireContext(ContextType.Guild)]
|
|
|
|
|
[RequireUserPermission(Discord.GuildPermission.ManageMessages)]
|
|
|
|
|
public async Task VerboseError()
|
|
|
|
|
{
|
2017-07-15 16:34:34 +00:00
|
|
|
|
var state = _service.ToggleVerboseErrors(Context.Guild.Id);
|
2017-06-12 12:26:14 +00:00
|
|
|
|
|
|
|
|
|
if (state)
|
|
|
|
|
await ReplyConfirmLocalized("verbose_errors_enabled").ConfigureAwait(false);
|
|
|
|
|
else
|
|
|
|
|
await ReplyConfirmLocalized("verbose_errors_disabled").ConfigureAwait(false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|