aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-12-21 18:55:13 -0500
committerRapptz <[email protected]>2017-12-21 18:55:13 -0500
commit97fc4bf651adbe90d2ead10cf6fffb419e9ffea1 (patch)
tree47ce486bebf3358c640cc197352b24bf2f79fea1
parentAnimated emoji support. (diff)
downloaddiscord.py-97fc4bf651adbe90d2ead10cf6fffb419e9ffea1.tar.xz
discord.py-97fc4bf651adbe90d2ead10cf6fffb419e9ffea1.zip
Update Emoji.url to point to the GIF version of the animated emoji.
-rw-r--r--discord/emoji.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/discord/emoji.py b/discord/emoji.py
index 42f4183c..0b66d179 100644
--- a/discord/emoji.py
+++ b/discord/emoji.py
@@ -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):