mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 17:58:26 -04:00
23 lines
744 B
C#
23 lines
744 B
C#
using NadekoBot.Modules.Utility.Services;
|
|
|
|
namespace NadekoBot.Modules.Utility;
|
|
|
|
public partial class Utility
|
|
{
|
|
[Group]
|
|
public class VerboseErrorCommands : NadekoSubmodule<VerboseErrorsService>
|
|
{
|
|
[NadekoCommand, Aliases]
|
|
[RequireContext(ContextType.Guild)]
|
|
[UserPerm(GuildPerm.ManageMessages)]
|
|
public async Task VerboseError(bool? newstate = null)
|
|
{
|
|
var state = _service.ToggleVerboseErrors(ctx.Guild.Id, newstate);
|
|
|
|
if (state)
|
|
await ReplyConfirmLocalizedAsync(strs.verbose_errors_enabled).ConfigureAwait(false);
|
|
else
|
|
await ReplyConfirmLocalizedAsync(strs.verbose_errors_disabled).ConfigureAwait(false);
|
|
}
|
|
}
|
|
} |