mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-12 00:39:56 +00:00
Fix sticker URL for GIF stickers
This commit is contained in:
parent
4e03b170ef
commit
61eddfcb18
@ -277,6 +277,9 @@ class Sticker(_StickerTag):
|
|||||||
self.name: str = data['name']
|
self.name: str = data['name']
|
||||||
self.description: str = data['description']
|
self.description: str = data['description']
|
||||||
self.format: StickerFormatType = try_enum(StickerFormatType, data['format_type'])
|
self.format: StickerFormatType = try_enum(StickerFormatType, data['format_type'])
|
||||||
|
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}'
|
self.url: str = f'{Asset.BASE}/stickers/{self.id}.{self.format.file_extension}'
|
||||||
|
|
||||||
def __repr__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user