From d239cc26666ff255a0c86c83541ef90f2b586598 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Fri, 9 Jun 2017 18:36:59 -0400 Subject: 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. --- discord/utils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'discord/utils.py') 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'): -- cgit v1.2.3