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:
Rapptz committed 2017-06-09 18:36:59 -04:00
1 parent 1be119cd45
commit d239cc2666
7 files changed
+178 -26

No files matched your search

+1 -3
View File
@@ -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'):