From 80b685ae9bdf40d4229be6758c0b4f2462d8e752 Mon Sep 17 00:00:00 2001 From: alyssa Date: Tue, 4 Jun 2024 18:52:55 +0900 Subject: [PATCH] fix(bot): throw correct error on invalid 6-character system id --- PluralKit.Bot/CommandMeta/CommandTree.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PluralKit.Bot/CommandMeta/CommandTree.cs b/PluralKit.Bot/CommandMeta/CommandTree.cs index 3b5df558..052da197 100644 --- a/PluralKit.Bot/CommandMeta/CommandTree.cs +++ b/PluralKit.Bot/CommandMeta/CommandTree.cs @@ -205,7 +205,7 @@ public partial class CommandTree // if we *still* haven't matched anything, the user entered an invalid command name or system reference if (ctx.Parameters._ptr == previousPtr) { - if (ctx.Parameters.Peek().Length != 5 && !ctx.Parameters.Peek().TryParseMention(out _)) + if (!ctx.Parameters.Peek().TryParseHid(out _) && !ctx.Parameters.Peek().TryParseMention(out _)) { await PrintCommandNotFoundError(ctx, SystemCommands); return;