mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Handle proxy tag length overflow in short member list
This commit is contained in:
parent
5caf040bbc
commit
a5f0d7ac13
1 changed files with 8 additions and 2 deletions
|
|
@ -177,8 +177,14 @@ namespace PluralKit.Bot.Commands
|
|||
eb.Description = string.Join("\n", ms.Select((m) =>
|
||||
{
|
||||
if (m.HasProxyTags)
|
||||
return
|
||||
$"[`{m.Hid}`] **{m.Name.SanitizeMentions()}** *({m.ProxyTagsString().SanitizeMentions()})*";
|
||||
{
|
||||
var proxyTagsString = m.ProxyTagsString().SanitizeMentions();
|
||||
if (proxyTagsString.Length > 100) // arbitrary threshold for now, tweak?
|
||||
proxyTagsString = "tags too long, see member card";
|
||||
|
||||
return $"[`{m.Hid}`] **{m.Name.SanitizeMentions()}** *({proxyTagsString})*";
|
||||
}
|
||||
|
||||
return $"[`{m.Hid}`] **{m.Name.SanitizeMentions()}**";
|
||||
}));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue