Browse Source

Change PartialInviteGuild.icon_url_as to mimic Guild.icon_url_as

pull/5069/head
Anurag 5 years ago
committed by GitHub
parent
commit
08af907807
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      discord/invite.py

11
discord/invite.py

@ -155,9 +155,16 @@ class PartialInviteGuild:
""":class:`Asset`: Returns the guild's icon asset."""
return self.icon_url_as()
def icon_url_as(self, *, format='webp', size=1024):
def is_icon_animated(self):
""":class:`bool`: Returns True if the guild has an animated icon.
.. 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…
Cancel
Save