Browse Source

Downgrade PartialReactionEmoji to str in non-raw reaction events.

pull/609/merge
Rapptz 8 years ago
parent
commit
c1dad43f9d
  1. 5
      discord/state.py

5
discord/state.py

@ -826,8 +826,11 @@ class ConnectionState:
return PartialReactionEmoji(id=emoji_id, name=data['name'])
def _upgrade_partial_emoji(self, emoji):
emoji_id = emoji.id
if not emoji_id:
return emoji.name
try:
return self._emojis[emoji.id]
return self._emojis[emoji_id]
except KeyError:
return emoji

Loading…
Cancel
Save