From 95eab5a4a37d7c3b87aa9765e6a70afde2763a61 Mon Sep 17 00:00:00 2001 From: Ske Date: Thu, 12 Jul 2018 03:41:10 +0200 Subject: [PATCH] Rearranging card fields --- bot/pluralkit/utils.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/bot/pluralkit/utils.py b/bot/pluralkit/utils.py index f5ba5279..6e871423 100644 --- a/bot/pluralkit/utils.py +++ b/bot/pluralkit/utils.py @@ -194,6 +194,11 @@ async def generate_member_info_card(conn, member: asyncpg.Record) -> discord.Emb if member["avatar_url"]: card.set_thumbnail(url=member["avatar_url"]) + # Get system name and hid + system = await db.get_system(conn, system_id=member["system"]) + if system["name"]: + system_value = "{}".format(system["name"]) + if member["color"]: card.colour = int(member["color"], 16) @@ -214,14 +219,6 @@ async def generate_member_info_card(conn, member: asyncpg.Record) -> discord.Emb card.add_field(name="Description", value=member["description"], inline=False) - # Get system name and hid - system = await db.get_system(conn, system_id=member["system"]) - if system["name"]: - system_value = "{} (`{}`)".format(system["name"], system["hid"]) - else: - system_value = "`{}`".format(system["hid"]) - card.add_field(name="System", value=system_value, inline=False) - card.set_footer(text="System ID: {} | Member ID: {}".format( system["hid"], member["hid"])) return card