aboutsummaryrefslogtreecommitdiff
path: root/discord/utils.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2015-11-26 22:55:26 -0500
committerRapptz <[email protected]>2015-11-26 22:55:26 -0500
commit9a5bb439ec9f6ab5d2fce7567452ca310736d688 (patch)
treef7e77e42552222e2a3080e7a23a615e040b18d24 /discord/utils.py
parentAdd support for uploading avatars. (diff)
downloaddiscord.py-9a5bb439ec9f6ab5d2fce7567452ca310736d688.tar.xz
discord.py-9a5bb439ec9f6ab5d2fce7567452ca310736d688.zip
GIF support for avatars
Diffstat (limited to 'discord/utils.py')
-rw-r--r--discord/utils.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/discord/utils.py b/discord/utils.py
index 423ddc8a..74f36070 100644
--- a/discord/utils.py
+++ b/discord/utils.py
@@ -71,5 +71,7 @@ def _get_mime_type_for_image(data):
return 'image/png'
elif data.startswith(b'\xFF\xD8') and data.endswith(b'\xFF\xD9'):
return 'image/jpeg'
+ elif data.startswith(b'GIF89a') or data.startswith(b'GIF87a'):
+ return 'image/gif'
else:
raise InvalidArgument('Unsupported image type given')