From 857b4d5c2604db10f6c63617dd501b7f334784c7 Mon Sep 17 00:00:00 2001 From: Petal Ladenson Date: Fri, 4 Oct 2024 05:00:07 -0600 Subject: [PATCH] feat(bot): better error message in pk;cfg member|group limits --- PluralKit.Bot/CommandMeta/CommandTree.cs | 2 ++ PluralKit.Bot/Commands/Config.cs | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/PluralKit.Bot/CommandMeta/CommandTree.cs b/PluralKit.Bot/CommandMeta/CommandTree.cs index 8864436c..9e2f27e4 100644 --- a/PluralKit.Bot/CommandMeta/CommandTree.cs +++ b/PluralKit.Bot/CommandMeta/CommandTree.cs @@ -546,6 +546,8 @@ public partial class CommandTree return ctx.Execute(null, m => m.HidDisplayCaps(ctx)); if (ctx.MatchMultiple(new[] { "pad" }, new[] { "id", "ids" }) || ctx.MatchMultiple(new[] { "id" }, new[] { "pad", "padding" }) || ctx.Match("idpad", "padid", "padids")) return ctx.Execute(null, m => m.HidListPadding(ctx)); + if (ctx.MatchMultiple(new[] { "member", "group" }, new[] { "limit" }) || ctx.Match("limit")) + return ctx.Execute(null, m => m.LimitUpdate(ctx)); // todo: maybe add the list of configuration keys here? return ctx.Reply($"{Emojis.Error} Could not find a setting with that name. Please see `pk;commands config` for the list of possible config settings."); diff --git a/PluralKit.Bot/Commands/Config.cs b/PluralKit.Bot/Commands/Config.cs index 05ad9aa6..3e081f38 100644 --- a/PluralKit.Bot/Commands/Config.cs +++ b/PluralKit.Bot/Commands/Config.cs @@ -536,4 +536,10 @@ public class Config } else throw new PKError(badInputError); } + + public Task LimitUpdate(Context ctx) + { + throw new PKError("You cannot update your own member or group limits. If you need a limit update, please join the " + + "support server and ask in #bot-support: https://discord.gg/PczBt78"); + } } \ No newline at end of file