From 021a5ae897c2c69347174e1acbedf12da376b0f7 Mon Sep 17 00:00:00 2001 From: dusk Date: Sun, 5 Jan 2025 16:30:05 +0900 Subject: [PATCH] chore: more todos --- PluralKit.Bot/CommandSystem/ParametersFFI.cs | 5 +++-- PluralKit.Bot/Handlers/MessageCreated.cs | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/PluralKit.Bot/CommandSystem/ParametersFFI.cs b/PluralKit.Bot/CommandSystem/ParametersFFI.cs index ac97af75..f7831e80 100644 --- a/PluralKit.Bot/CommandSystem/ParametersFFI.cs +++ b/PluralKit.Bot/CommandSystem/ParametersFFI.cs @@ -73,6 +73,7 @@ public class Parameters } } +// TODO: im not really sure if this should be the way to go public class ResolvedParameters { public readonly Parameters Raw; @@ -87,11 +88,11 @@ public class ResolvedParameters } } -// TODO: move this to another file +// TODO: move this to another file (?) public static class ParametersExt { public static bool HasFlag(this Parameters parameters, params string[] potentialMatches) { return potentialMatches.Any(parameters.Flags().ContainsKey); } -} \ No newline at end of file +} diff --git a/PluralKit.Bot/Handlers/MessageCreated.cs b/PluralKit.Bot/Handlers/MessageCreated.cs index 70ae757b..293f7bb4 100644 --- a/PluralKit.Bot/Handlers/MessageCreated.cs +++ b/PluralKit.Bot/Handlers/MessageCreated.cs @@ -147,6 +147,7 @@ public class MessageCreated: IEventHandler catch (PKError e) { // don't send an "invalid command" response if the guild has those turned off + // TODO: only dont send command not found, not every parse error (eg. missing params, syntax error...) if (!(ctx.GuildConfig != null && ctx.GuildConfig!.InvalidCommandResponseEnabled != true)) { await ctx.Reply($"{Emojis.Error} {e.Message}"); @@ -211,4 +212,4 @@ public class MessageCreated: IEventHandler return false; } -} \ No newline at end of file +}