Browse Source

Use webp as the default emoji URL format

Fix #10331
pull/10328/merge
Rapptz 2 days ago
parent
commit
9c327df45a
  1. 2
      discord/emoji.py
  2. 2
      discord/partial_emoji.py

2
discord/emoji.py

@ -165,7 +165,7 @@ class Emoji(_EmojiTag, AssetMixin):
@property
def url(self) -> str:
""":class:`str`: Returns the URL of the emoji."""
fmt = 'gif' if self.animated else 'png'
fmt = 'webp' if self.animated else 'png'
return f'{Asset.BASE}/emojis/{self.id}.{fmt}'
@property

2
discord/partial_emoji.py

@ -245,7 +245,7 @@ class PartialEmoji(_EmojiTag, AssetMixin):
if self.is_unicode_emoji():
return ''
fmt = 'gif' if self.animated else 'png'
fmt = 'webp' if self.animated else 'png'
return f'{Asset.BASE}/emojis/{self.id}.{fmt}'
async def read(self) -> bytes:

Loading…
Cancel
Save