mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-15 18:20:11 +00:00
Truncate the echoed command in the not found error
This commit is contained in:
parent
66f7a664c8
commit
99d6942ff4
1 changed files with 3 additions and 1 deletions
|
|
@ -4,6 +4,8 @@ using System.Threading.Tasks;
|
||||||
using DSharpPlus;
|
using DSharpPlus;
|
||||||
using DSharpPlus.Exceptions;
|
using DSharpPlus.Exceptions;
|
||||||
|
|
||||||
|
using Humanizer;
|
||||||
|
|
||||||
using PluralKit.Core;
|
using PluralKit.Core;
|
||||||
|
|
||||||
namespace PluralKit.Bot
|
namespace PluralKit.Bot
|
||||||
|
|
@ -330,7 +332,7 @@ namespace PluralKit.Bot
|
||||||
{
|
{
|
||||||
var commandListStr = CreatePotentialCommandList(potentialCommands);
|
var commandListStr = CreatePotentialCommandList(potentialCommands);
|
||||||
await ctx.Reply(
|
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 <https://pluralkit.me/commands>.");
|
$"{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 <https://pluralkit.me/commands>.");
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task PrintCommandExpectedError(Context ctx, params Command[] potentialCommands)
|
private async Task PrintCommandExpectedError(Context ctx, params Command[] potentialCommands)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue