diff --git a/discord/asset.py b/discord/asset.py index c58cfd364..36ce08e27 100644 --- a/discord/asset.py +++ b/discord/asset.py @@ -208,11 +208,13 @@ class Asset(AssetMixin): @classmethod def _from_guild_image(cls, state, guild_id: int, image: str, path: str) -> Asset: + animated = image.startswith('a_') + format = 'gif' if animated else 'png' return cls( state, - url=f'{cls.BASE}/{path}/{guild_id}/{image}.png?size=1024', + url=f'{cls.BASE}/{path}/{guild_id}/{image}.{format}?size=1024', key=image, - animated=False, + animated=animated, ) @classmethod diff --git a/discord/guild.py b/discord/guild.py index 01993a4d7..2dd7b25ff 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -197,6 +197,7 @@ class Guild(Hashable): They are currently as follows: + - ``ANIMATED_BANNER``: Guild can upload an animated banner. - ``ANIMATED_ICON``: Guild can upload an animated icon. - ``BANNER``: Guild can upload and use a banner. (i.e. :attr:`.banner`) - ``COMMERCE``: Guild can sell things using store channels.