mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-16 18:50:13 +00:00
bot: add member count to system card
This commit is contained in:
parent
e3d4bf17c2
commit
da8bd20de1
1 changed files with 4 additions and 1 deletions
|
|
@ -109,7 +109,10 @@ async def system_card(conn, client: discord.Client, system: System, is_own_syste
|
|||
card.add_field(name="Description",
|
||||
value=truncate_field_body(system.description), inline=False)
|
||||
|
||||
card.add_field(name="Members", value="*See `pk;system {0} list`for the short list, or `pk;system {0} list full` for the detailed list*".format(system.hid) if not is_own_system else "*See `pk;system list` for the short list, or `pk;system list full` for the detailed list*")
|
||||
all_members = await system.get_members(conn)
|
||||
member_count = len(all_members)
|
||||
|
||||
card.add_field(name="Members", value="Count: {}\n*See `pk;system {0} list`for the short list, or `pk;system {0} list full` for the detailed list*".format(member_count, system.hid) if not is_own_system else "Count: {}\n*See `pk;system list` for the short list, or `pk;system list full` for the detailed list*".format(member_count))
|
||||
card.set_footer(text="System ID: {}".format(system.hid))
|
||||
return card
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue