Add clickable account tags on pk;system card

This commit is contained in:
Ske 2019-04-15 12:42:20 +02:00
parent b7d648935d
commit f978029137

View File

@ -97,8 +97,11 @@ async def system_card(conn, client: discord.Client, system: System, is_own_syste
account_names = [] account_names = []
for account_id in await system.get_linked_account_ids(conn): for account_id in await system.get_linked_account_ids(conn):
try:
account = await client.get_user_info(account_id) account = await client.get_user_info(account_id)
account_names.append("{}#{}".format(account.name, account.discriminator)) account_names.append("{} ({}#{})".format(account_id, account.name, account.discriminator))
except discord.NotFound:
account_names.append("(deleted account {})".format(account_id))
card.add_field(name="Linked accounts", value=truncate_field_body("\n".join(account_names))) card.add_field(name="Linked accounts", value=truncate_field_body("\n".join(account_names)))