mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-19 15:36:02 +00:00
Change PartialInviteGuild.icon_url_as to mimic Guild.icon_url_as
This commit is contained in:
parent
4078d64520
commit
08af907807
@ -154,10 +154,17 @@ class PartialInviteGuild:
|
||||
def icon_url(self):
|
||||
""":class:`Asset`: Returns the guild's icon asset."""
|
||||
return self.icon_url_as()
|
||||
|
||||
def is_icon_animated(self):
|
||||
""":class:`bool`: Returns True if the guild has an animated icon.
|
||||
|
||||
def icon_url_as(self, *, format='webp', size=1024):
|
||||
.. versionadded:: 1.4
|
||||
"""
|
||||
return bool(self.icon and self.icon.startswith('a_'))
|
||||
|
||||
def icon_url_as(self, *, format=None, static_format='webp', size=1024):
|
||||
"""The same operation as :meth:`Guild.icon_url_as`."""
|
||||
return Asset._from_guild_image(self._state, self.id, self.icon, 'icons', format=format, size=size)
|
||||
return Asset._from_guild_icon(self._state, self, format=format, static_format=static_format, size=size)
|
||||
|
||||
@property
|
||||
def banner_url(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user