diff options
| author | Rapptz <[email protected]> | 2017-12-21 18:55:13 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-12-21 18:55:13 -0500 |
| commit | 97fc4bf651adbe90d2ead10cf6fffb419e9ffea1 (patch) | |
| tree | 47ce486bebf3358c640cc197352b24bf2f79fea1 | |
| parent | Animated emoji support. (diff) | |
| download | discord.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.py | 3 |
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): |