Skip to content

Commit a52629e

Browse files
authored
Merge branch 'master' into choices
2 parents 8df1da7 + faa9534 commit a52629e

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

CHANGELOG.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,16 @@ These changes are available on the `master` branch, but have not yet been releas
101101
([#2564](https://github.com/Pycord-Development/pycord/pull/2564))
102102
- Fixed `Subscription.renewal_sku_ids` not accepting `None` from the received payload.
103103
([#2709](https://github.com/Pycord-Development/pycord/pull/2709))
104-
- Fixed `ForumChannel.edit` allowing `default_reaction_emoji` to be `None`
104+
- Fixed `ForumChannel.edit` allowing `default_reaction_emoji` to be `None`.
105105
([#2739](https://github.com/Pycord-Development/pycord/pull/2739))
106106
- Fixed missing `None` type hints in `Select.__init__`.
107-
([#2746])(https://github.com/Pycord-Development/pycord/pull/2746)
107+
([#2746](https://github.com/Pycord-Development/pycord/pull/2746))
108108
- Updated `valid_locales` to support `in` and `es-419`.
109-
([#2767])(https://github.com/Pycord-Development/pycord/pull/2767)
109+
([#2767](https://github.com/Pycord-Development/pycord/pull/2767))
110110
- Fixed `Webhook.edit` not working with `attachments=[]`.
111-
([#2779])(https://github.com/Pycord-Development/pycord/pull/2779)
111+
([#2779](https://github.com/Pycord-Development/pycord/pull/2779))
112+
- Fixed GIF-based `Sticker` returning the wrong `url`.
113+
([#2781](https://github.com/Pycord-Development/pycord/pull/2781))
112114

113115
### Changed
114116

discord/sticker.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,12 @@ def __init__(self, *, state: ConnectionState, data: StickerItemPayload):
212212
self.format: StickerFormatType = try_enum(
213213
StickerFormatType, data["format_type"]
214214
)
215-
self.url: str = f"{Asset.BASE}/stickers/{self.id}.{self.format.file_extension}"
215+
base = (
216+
"https://media.discordapp.net"
217+
if self.format is StickerFormatType.gif
218+
else Asset.BASE
219+
)
220+
self.url: str = f"{base}/stickers/{self.id}.{self.format.file_extension}"
216221

217222
def __repr__(self) -> str:
218223
return f"<StickerItem id={self.id} name={self.name!r} format={self.format}>"
@@ -288,7 +293,12 @@ def _from_data(self, data: StickerPayload) -> None:
288293
self.format: StickerFormatType = try_enum(
289294
StickerFormatType, data["format_type"]
290295
)
291-
self.url: str = f"{Asset.BASE}/stickers/{self.id}.{self.format.file_extension}"
296+
base = (
297+
"https://media.discordapp.net"
298+
if self.format is StickerFormatType.gif
299+
else Asset.BASE
300+
)
301+
self.url: str = f"{base}/stickers/{self.id}.{self.format.file_extension}"
292302

293303
def __repr__(self) -> str:
294304
return f"<Sticker id={self.id} name={self.name!r}>"

0 commit comments

Comments
 (0)