Fix url for GIF StickerItem

This commit is contained in:
Gaurav 2024-08-29 01:18:19 +05:30 committed by GitHub
parent 1c6f3c5ff1
commit 7cf6df166d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -203,6 +203,9 @@ class StickerItem(_StickerTag):
self.name: str = data['name'] self.name: str = data['name']
self.id: int = int(data['id']) self.id: int = int(data['id'])
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: