diff --git a/CHANGELOG.md b/CHANGELOG.md index 85d14e3309..65100c9ebc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -99,14 +99,16 @@ These changes are available on the `master` branch, but have not yet been releas ([#2564](https://github.com/Pycord-Development/pycord/pull/2564)) - Fixed `Subscription.renewal_sku_ids` not accepting `None` from the received payload. ([#2709](https://github.com/Pycord-Development/pycord/pull/2709)) -- Fixed `ForumChannel.edit` allowing `default_reaction_emoji` to be `None` +- Fixed `ForumChannel.edit` allowing `default_reaction_emoji` to be `None`. ([#2739](https://github.com/Pycord-Development/pycord/pull/2739)) - Fixed missing `None` type hints in `Select.__init__`. - ([#2746])(https://github.com/Pycord-Development/pycord/pull/2746) + ([#2746](https://github.com/Pycord-Development/pycord/pull/2746)) - Updated `valid_locales` to support `in` and `es-419`. - ([#2767])(https://github.com/Pycord-Development/pycord/pull/2767) + ([#2767](https://github.com/Pycord-Development/pycord/pull/2767)) - Fixed `Webhook.edit` not working with `attachments=[]`. - ([#2779])(https://github.com/Pycord-Development/pycord/pull/2779) + ([#2779](https://github.com/Pycord-Development/pycord/pull/2779)) +- Fixed GIF-based `Sticker` returning the wrong `url`. + ([#2781](https://github.com/Pycord-Development/pycord/pull/2781)) ### Changed diff --git a/discord/sticker.py b/discord/sticker.py index d204c4b369..78b4b8c1f4 100644 --- a/discord/sticker.py +++ b/discord/sticker.py @@ -212,7 +212,12 @@ def __init__(self, *, state: ConnectionState, data: StickerItemPayload): self.format: StickerFormatType = try_enum( StickerFormatType, data["format_type"] ) - self.url: str = f"{Asset.BASE}/stickers/{self.id}.{self.format.file_extension}" + base = ( + "https://media.discordapp.net" + if self.format is StickerFormatType.gif + else Asset.BASE + ) + self.url: str = f"{base}/stickers/{self.id}.{self.format.file_extension}" def __repr__(self) -> str: return f"" @@ -288,7 +293,12 @@ def _from_data(self, data: StickerPayload) -> None: self.format: StickerFormatType = try_enum( StickerFormatType, data["format_type"] ) - self.url: str = f"{Asset.BASE}/stickers/{self.id}.{self.format.file_extension}" + base = ( + "https://media.discordapp.net" + if self.format is StickerFormatType.gif + else Asset.BASE + ) + self.url: str = f"{base}/stickers/{self.id}.{self.format.file_extension}" def __repr__(self) -> str: return f""