Update Emoji.url to point to the GIF version of the animated emoji.

This commit is contained in:
Rapptz 2017-12-21 18:55:13 -05:00
parent a6bf792dec
commit 97fc4bf651

View File

@ -170,7 +170,8 @@ class Emoji(Hashable):
@property
def url(self):
"""Returns a URL version of the emoji."""
return "https://cdn.discordapp.com/emojis/{0.id}.png".format(self)
_format = 'gif' if self.animated else 'png'
return "https://cdn.discordapp.com/emojis/{0.id}.{1}".format(self, _format)
@property
def roles(self):