diff --git a/discord/invite.py b/discord/invite.py index cfbbdf72e..e16fbe78d 100644 --- a/discord/invite.py +++ b/discord/invite.py @@ -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):