mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
Display member count on system card
This commit is contained in:
parent
7475980bd3
commit
da307c2dc9
2 changed files with 9 additions and 1 deletions
|
|
@ -29,6 +29,8 @@ namespace PluralKit.Bot {
|
|||
// Fetch/render info for all accounts simultaneously
|
||||
var users = await Task.WhenAll(accounts.Select(async uid => (await _client.GetUserAsync(uid))?.NameAndMention() ?? $"(deleted account {uid})"));
|
||||
|
||||
var memberCount = await _members.MemberCount(system);
|
||||
|
||||
var eb = new EmbedBuilder()
|
||||
.WithColor(Color.Blue)
|
||||
.WithTitle(system.Name ?? null)
|
||||
|
|
@ -37,7 +39,7 @@ namespace PluralKit.Bot {
|
|||
.WithFooter($"System ID: {system.Hid}");
|
||||
|
||||
eb.AddField("Linked accounts", string.Join(", ", users));
|
||||
eb.AddField("Members", $"(see `pk;system {system.Hid} list` or `pk;system {system.Hid} list full`)");
|
||||
eb.AddField($"Members ({memberCount})", $"(see `pk;system {system.Hid} list` or `pk;system {system.Hid} list full`)");
|
||||
// TODO: fronter
|
||||
return eb.Build();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue