From 99d6942ff4c96c0cef805620a436960f5e1c354b Mon Sep 17 00:00:00 2001 From: Ske Date: Sat, 18 Jul 2020 12:58:18 +0200 Subject: [PATCH] Truncate the echoed command in the not found error --- PluralKit.Bot/Commands/CommandTree.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PluralKit.Bot/Commands/CommandTree.cs b/PluralKit.Bot/Commands/CommandTree.cs index 8f564023..08fd4a6e 100644 --- a/PluralKit.Bot/Commands/CommandTree.cs +++ b/PluralKit.Bot/Commands/CommandTree.cs @@ -4,6 +4,8 @@ using System.Threading.Tasks; using DSharpPlus; using DSharpPlus.Exceptions; +using Humanizer; + using PluralKit.Core; namespace PluralKit.Bot @@ -330,7 +332,7 @@ namespace PluralKit.Bot { var commandListStr = CreatePotentialCommandList(potentialCommands); await ctx.Reply( - $"{Emojis.Error} Unknown command `pk;{ctx.FullCommand()}`. Perhaps you meant to use one of the following commands?\n{commandListStr}\n\nFor a full list of possible commands, see ."); + $"{Emojis.Error} Unknown command `pk;{ctx.FullCommand().Truncate(100)}`. Perhaps you meant to use one of the following commands?\n{commandListStr}\n\nFor a full list of possible commands, see ."); } private async Task PrintCommandExpectedError(Context ctx, params Command[] potentialCommands)