Skip to content

Commit ebe91e7

Browse files
committed
feat: add user.avatar_url
code suggestion tools love suggesting snippet, this adds that
1 parent df6487b commit ebe91e7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

interactions/models/discord/user.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ def display_avatar(self) -> "Asset":
8383
"""The users displayed avatar, will return `guild_avatar` if one is set, otherwise will return user avatar."""
8484
return self.avatar
8585

86+
@property
87+
def avatar_url(self) -> str:
88+
"""The users avatar url."""
89+
return self.avatar.url
90+
8691
async def fetch_dm(self) -> "DM":
8792
"""Fetch the DM channel associated with this user."""
8893
return await self._client.cache.fetch_dm_channel(self.id) # noqa

0 commit comments

Comments
 (0)