bot: sort member list alphabetically
This commit is contained in:
parent
9a5a5ce34f
commit
c359935855
@ -103,7 +103,7 @@ namespace PluralKit.Bot.Commands
|
|||||||
var members = await Members.GetBySystem(system);
|
var members = await Members.GetBySystem(system);
|
||||||
var embedTitle = system.Name != null ? $"Members of {system.Name} (`{system.Hid}`)" : $"Members of `{system.Hid}`";
|
var embedTitle = system.Name != null ? $"Members of {system.Name} (`{system.Hid}`)" : $"Members of `{system.Hid}`";
|
||||||
await Context.Paginate<PKMember>(
|
await Context.Paginate<PKMember>(
|
||||||
members.ToList(),
|
members.OrderBy(m => m.Name).ToList(),
|
||||||
25,
|
25,
|
||||||
embedTitle,
|
embedTitle,
|
||||||
(eb, ms) => eb.Description = string.Join("\n", ms.Select((m) => $"[`{m.Hid}`] **{m.Name}** *({m.Prefix ?? ""}text{m.Suffix ?? ""})*"))
|
(eb, ms) => eb.Description = string.Join("\n", ms.Select((m) => $"[`{m.Hid}`] **{m.Name}** *({m.Prefix ?? ""}text{m.Suffix ?? ""})*"))
|
||||||
@ -120,7 +120,7 @@ namespace PluralKit.Bot.Commands
|
|||||||
var members = await Members.GetBySystem(system);
|
var members = await Members.GetBySystem(system);
|
||||||
var embedTitle = system.Name != null ? $"Members of {system.Name} (`{system.Hid}`)" : $"Members of `{system.Hid}`";
|
var embedTitle = system.Name != null ? $"Members of {system.Name} (`{system.Hid}`)" : $"Members of `{system.Hid}`";
|
||||||
await Context.Paginate<PKMember>(
|
await Context.Paginate<PKMember>(
|
||||||
members.ToList(),
|
members.OrderBy(m => m.Name).ToList(),
|
||||||
10,
|
10,
|
||||||
embedTitle,
|
embedTitle,
|
||||||
(eb, ms) => {
|
(eb, ms) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user