refactor(bot): separate MatchClear from ConfirmClear

This commit is contained in:
spiral 2022-12-01 07:16:36 +00:00
parent f06fdb38ef
commit f9abcc68c4
No known key found for this signature in database
GPG key ID: 244A11E4B0BCF40E
9 changed files with 28 additions and 36 deletions

View file

@ -23,7 +23,7 @@ public class ServerConfig
await ctx.CheckGuildContext().CheckAuthorPermission(PermissionSet.ManageGuild, "Manage Server");
var settings = await ctx.Repository.GetGuild(ctx.Guild.Id);
if (await ctx.MatchClear("the server log channel"))
if (ctx.MatchClear() && await ctx.ConfirmClear("the server log channel"))
{
await ctx.Repository.UpdateGuild(ctx.Guild.Id, new GuildPatch { LogChannel = null });
await ctx.Reply($"{Emojis.Success} Proxy logging channel cleared.");