diff options
| author | Rapptz <[email protected]> | 2017-06-09 18:36:59 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-06-09 18:36:59 -0400 |
| commit | d239cc26666ff255a0c86c83541ef90f2b586598 (patch) | |
| tree | f7c644f297190cede85b324bdb1d776543523a1e /discord/utils.py | |
| parent | Allow sending files list smaller than 2 elements in Messageable.send (diff) | |
| download | discord.py-d239cc26666ff255a0c86c83541ef90f2b586598.tar.xz discord.py-d239cc26666ff255a0c86c83541ef90f2b586598.zip | |
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.
Diffstat (limited to 'discord/utils.py')
| -rw-r--r-- | discord/utils.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/discord/utils.py b/discord/utils.py index 35044836..06aa5a35 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -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'): |