From c69bea86df4ff59f81b5f8961252f735f3b48d09 Mon Sep 17 00:00:00 2001 From: Ske Date: Fri, 23 Oct 2020 12:18:40 +0200 Subject: [PATCH] Fix log channel clear confirm --- PluralKit.Bot/CommandSystem/ContextArgumentsExt.cs | 6 +++--- PluralKit.Bot/Commands/ServerConfig.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PluralKit.Bot/CommandSystem/ContextArgumentsExt.cs b/PluralKit.Bot/CommandSystem/ContextArgumentsExt.cs index 8d8a9ce0..0a0c98b5 100644 --- a/PluralKit.Bot/CommandSystem/ContextArgumentsExt.cs +++ b/PluralKit.Bot/CommandSystem/ContextArgumentsExt.cs @@ -63,9 +63,9 @@ namespace PluralKit.Bot public static async Task MatchClear(this Context ctx, string toClear = null) { var matched = ctx.Match("clear", "reset") || ctx.MatchFlag("c", "clear"); - Console.WriteLine(toClear); - if (matched && toClear != null) return await ctx.ConfirmClear(toClear); - else return matched; + if (matched && toClear != null) + return await ctx.ConfirmClear(toClear); + return matched; } public static async Task> ParseMemberList(this Context ctx, SystemId? restrictToSystem) diff --git a/PluralKit.Bot/Commands/ServerConfig.cs b/PluralKit.Bot/Commands/ServerConfig.cs index c260b56a..86bbd4ff 100644 --- a/PluralKit.Bot/Commands/ServerConfig.cs +++ b/PluralKit.Bot/Commands/ServerConfig.cs @@ -26,7 +26,7 @@ namespace PluralKit.Bot { ctx.CheckGuildContext().CheckAuthorPermission(Permissions.ManageGuild, "Manage Server"); - if (await ctx.MatchClear()) + if (await ctx.MatchClear("the server log channel")) { await _db.Execute(conn => _repo.UpsertGuild(conn, ctx.Guild.Id, new GuildPatch {LogChannel = null})); await ctx.Reply($"{Emojis.Success} Proxy logging channel cleared.");