mirror of https://codeberg.org/soteria/sox.git
fix: fallback to username if no display
This commit is contained in:
parent
8e86738a89
commit
9d15fbb0eb
|
|
@ -14,7 +14,7 @@ async def get_posts(inter: disnake.CommandInteraction):
|
|||
embed_list = []
|
||||
for post in r:
|
||||
user = await soteria.User.fetch(sot, post["author"])
|
||||
embed_list.append(disnake.Embed(title=f"Author: {user.display_name}", description=post["content"], color=disnake.Color.blue()))
|
||||
embed_list.append(disnake.Embed(title=f"Author: {user.display_name if user.display_name else user.username}", description=post["content"], color=disnake.Color.blue()))
|
||||
await inter.edit_original_response(embeds=embed_list)
|
||||
await sot.close()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue