Browse Source

Fix sticker URL for GIF stickers

pull/9738/head
owocado 1 year ago
committed by GitHub
parent
commit
61eddfcb18
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      discord/sticker.py

5
discord/sticker.py

@ -277,7 +277,10 @@ class Sticker(_StickerTag):
self.name: str = data['name']
self.description: str = data['description']
self.format: StickerFormatType = try_enum(StickerFormatType, data['format_type'])
self.url: str = f'{Asset.BASE}/stickers/{self.id}.{self.format.file_extension}'
if self.format is StickerFormatType.gif:
self.url: str = f'https://media.discordapp.net/stickers/{self.id}.gif'
else:
self.url: str = f'{Asset.BASE}/stickers/{self.id}.{self.format.file_extension}'
def __repr__(self) -> str:
return f'<Sticker id={self.id} name={self.name!r}>'

Loading…
Cancel
Save