Rearranging card fields
This commit is contained in:
parent
1d8512186b
commit
95eab5a4a3
@ -194,6 +194,11 @@ async def generate_member_info_card(conn, member: asyncpg.Record) -> discord.Emb
|
|||||||
if member["avatar_url"]:
|
if member["avatar_url"]:
|
||||||
card.set_thumbnail(url=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"]:
|
if member["color"]:
|
||||||
card.colour = int(member["color"], 16)
|
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",
|
card.add_field(name="Description",
|
||||||
value=member["description"], inline=False)
|
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(
|
card.set_footer(text="System ID: {} | Member ID: {}".format(
|
||||||
system["hid"], member["hid"]))
|
system["hid"], member["hid"]))
|
||||||
return card
|
return card
|
||||||
|
Loading…
Reference in New Issue
Block a user