avatar urls in stead of assets

This commit is contained in:
iDutchy 2020-09-13 23:57:18 +00:00
parent 4b612aeece
commit 43c4d33a4a
2 changed files with 4 additions and 7 deletions

View File

@ -580,8 +580,8 @@ class Guild(Hashable):
@property
def icon_url(self):
""":class:`Asset`: Returns the guild's icon asset."""
return self.icon_url_as()
""":class:`str`: Returns the guild's direct icon url."""
return str(self.icon_url_as(static_format="png"))
def is_icon_animated(self):
""":class:`bool`: Returns True if the guild has an animated icon."""

View File

@ -139,15 +139,12 @@ class BaseUser(_BaseUser):
@property
def avatar_url(self):
""":class:`Asset`: Returns an :class:`Asset` for the avatar the user has.
""":class:`str`: Returns an direct url for the avatar the user has.
If the user does not have a traditional avatar, an asset for
the default avatar is returned instead.
This is equivalent to calling :meth:`avatar_url_as` with
the default parameters (i.e. webp/gif detection and a size of 1024).
"""
return self.avatar_url_as(format=None, size=1024)
return str(self.avatar_url_as(static_format="png", size=1024))
def is_avatar_animated(self):
"""Indicates if the user has an animated avatar."""