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.
This commit is contained in:
khazhyk 2016-11-05 21:40:54 -07:00
parent 4fa1349869
commit 8bd242f00b

View File

@ -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: