fix: don't crash in lists when searching for a string longer than 256 characters

This commit is contained in:
spiral
2022-01-23 01:47:55 -05:00
parent 84e7e71f88
commit 8ce7465177
3 changed files with 9 additions and 3 deletions

View File

@@ -1,5 +1,7 @@
using System.Text;
using Humanizer;
using Myriad.Builders;
using PluralKit.Core;
@@ -134,7 +136,7 @@ public class GroupMember
else
title.Append($"`{targetSystem.Hid}`");
if (opts.Search != null)
title.Append($" matching **{opts.Search}**");
title.Append($" matching **{opts.Search.Truncate(100)}**");
await ctx.RenderMemberList(ctx.LookupContextFor(target.System), target.System, title.ToString(),
target.Color, opts);