mirror of https://codeberg.org/soteria/sox.git
feat: add user profile pictures and links
This commit is contained in:
parent
1fe28d710e
commit
e1e274f14b
|
|
@ -14,7 +14,20 @@ 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 if user.display_name else user.username}", description=post["content"], color=disnake.Color.blue()))
|
||||
|
||||
embed = disnake.Embed(
|
||||
description=post["content"],
|
||||
color=disnake.Color.blue()
|
||||
)
|
||||
|
||||
embed.set_author(
|
||||
name=user.display_name if user.display_name else user.username,
|
||||
url=f"https://soteria.social/{user.id}",
|
||||
icon_url=soteria.Asset(sot, user.avatar).url
|
||||
)
|
||||
|
||||
embed_list.append(embed)
|
||||
|
||||
await inter.edit_original_response(embeds=embed_list)
|
||||
await sot.close()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue