mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-20 13:29:03 +00:00
Implement "partial" message events.
These are events that get triggered regardless of the state of the message cache. Useful for getting data from before the bot was booted.
This commit is contained in:
1 parent
1be119cd45
commit
d239cc2666
7 files changed
+178
-26
No files matched your search
+1
-3
@@ -237,9 +237,7 @@ def _get_as_snowflake(data, key):
|
||||
except KeyError:
|
||||
return None
|
||||
else:
|
||||
if value is None:
|
||||
return value
|
||||
return int(value)
|
||||
return value and int(value)
|
||||
|
||||
def _get_mime_type_for_image(data):
|
||||
if data.startswith(b'\x89\x50\x4E\x47\x0D\x0A\x1A\x0A'):
|
||||
|
||||
Reference in new issue
Block a user