mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Truncate roles list if it gets too long
This commit is contained in:
parent
d875472c9f
commit
7b59040da2
1 changed files with 4 additions and 1 deletions
|
|
@ -203,7 +203,10 @@ namespace PluralKit.Bot {
|
||||||
|
|
||||||
var roles = memberInfo?.Roles?.ToList();
|
var roles = memberInfo?.Roles?.ToList();
|
||||||
if (roles != null && roles.Count > 0)
|
if (roles != null && roles.Count > 0)
|
||||||
eb.AddField($"Account roles ({roles.Count})", string.Join(", ", roles.Select(role => role.Name)));
|
{
|
||||||
|
var rolesString = string.Join(", ", roles.Select(role => role.Name));
|
||||||
|
eb.AddField($"Account roles ({roles.Count})", rolesString.Truncate(1024));
|
||||||
|
}
|
||||||
|
|
||||||
return eb.Build();
|
return eb.Build();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue