aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkhazhyk <[email protected]>2016-11-05 21:40:54 -0700
committerkhazhyk <[email protected]>2016-11-05 21:46:07 -0700
commit8bd242f00b575aedfe3e53c75da48b1256af2fa2 (patch)
tree22425f8865e9d8487fc87f86c00d9beadf5f9c6a
parentVersion bump to v0.14.2 (diff)
downloaddiscord.py-8bd242f00b575aedfe3e53c75da48b1256af2fa2.tar.xz
discord.py-8bd242f00b575aedfe3e53c75da48b1256af2fa2.zip
Fix crash on reaction remove.
Discord can sometimes send integer 0 as the emoji id instead of null to signify a non-custom emoji, which was causing a crash due to a 'is not None' check assuming the reaction was for an emoji with id 0. Probably a discord bug, but preferable to handle here rather than crash users.
-rw-r--r--discord/state.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/state.py b/discord/state.py
index 3c687313..9df36cf0 100644
--- a/discord/state.py
+++ b/discord/state.py
@@ -688,7 +688,7 @@ class ConnectionState:
def _get_reaction_emoji(self, **data):
id = data['id']
- if id is None:
+ if not id:
return data['name']
for server in self.servers: