mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
Truncate member profile in long system list
This commit is contained in:
parent
a201ad644e
commit
fe22ba4f32
2 changed files with 3 additions and 7 deletions
|
|
@ -3,6 +3,7 @@ using System.Linq;
|
|||
using System.Threading.Tasks;
|
||||
using Discord;
|
||||
using Discord.Commands;
|
||||
using Humanizer;
|
||||
using NodaTime;
|
||||
using NodaTime.Text;
|
||||
using NodaTime.TimeZones;
|
||||
|
|
@ -174,7 +175,7 @@ namespace PluralKit.Bot.Commands
|
|||
var embedTitle = system.Name != null ? $"Members of {system.Name} (`{system.Hid}`)" : $"Members of `{system.Hid}`";
|
||||
await Context.Paginate<PKMember>(
|
||||
members.OrderBy(m => m.Name).ToList(),
|
||||
10,
|
||||
5,
|
||||
embedTitle,
|
||||
(eb, ms) => {
|
||||
foreach (var m in ms) {
|
||||
|
|
@ -183,7 +184,7 @@ namespace PluralKit.Bot.Commands
|
|||
if (m.Birthday != null) profile += $"\n**Birthdate**: {m.BirthdayString}";
|
||||
if (m.Prefix != null || m.Suffix != null) profile += $"\n**Proxy tags**: {m.ProxyString}";
|
||||
if (m.Description != null) profile += $"\n\n{m.Description}";
|
||||
eb.AddField(m.Name, profile);
|
||||
eb.AddField(m.Name, profile.Truncate(1024));
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue