Fix crash on member listing with member without description
This commit is contained in:
parent
0266db5589
commit
c0718a1516
@ -244,10 +244,11 @@ def member_list(system: System, all_members: List[Member], current_page: int, pa
|
|||||||
member_description += "**Birthday:** {}\n".format(member.birthday_string())
|
member_description += "**Birthday:** {}\n".format(member.birthday_string())
|
||||||
if member.pronouns:
|
if member.pronouns:
|
||||||
member_description += "**Pronouns:** {}\n".format(member.pronouns)
|
member_description += "**Pronouns:** {}\n".format(member.pronouns)
|
||||||
if len(member.description) > 512:
|
if member.description:
|
||||||
member_description += "\n" + truncate_description_list(member.description) + "\n" + "Type `pk;member {}` for full description.".format(member.hid)
|
if len(member.description) > 512:
|
||||||
else:
|
member_description += "\n" + truncate_description_list(member.description) + "\n" + "Type `pk;member {}` for full description.".format(member.hid)
|
||||||
member_description += "\n" + member.description
|
else:
|
||||||
|
member_description += "\n" + member.description
|
||||||
|
|
||||||
embed.add_field(name=member.name, value=truncate_field_body(member_description) or "\u200B", inline=False)
|
embed.add_field(name=member.name, value=truncate_field_body(member_description) or "\u200B", inline=False)
|
||||||
return embed
|
return embed
|
||||||
|
Loading…
Reference in New Issue
Block a user