Support MESSAGE_REACTION_REMOVE_ALL event.

This commit is contained in:
Rapptz
2016-11-21 02:49:50 -05:00
parent e8905fd41b
commit 92c3c2804d
2 changed files with 16 additions and 0 deletions

View File

@ -274,6 +274,13 @@ class ConnectionState:
self.dispatch('reaction_add', reaction, member)
def parse_message_reaction_remove_all(self, data):
message = self._get_message(data['message_id'])
if message is not None:
old_reactions = message.reactions.copy()
message.reactions.clear()
self.dispatch('reaction_clear', message, old_reactions)
def parse_message_reaction_remove(self, data):
message = self._get_message(data['message_id'])
if message is not None: