mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-20 16:00:29 +00:00
GIF support for avatars
This commit is contained in:
parent
f0617fbb6a
commit
9a5bb439ec
@ -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')
|
||||
|
Loading…
x
Reference in New Issue
Block a user