From 92c3c2804d7f543adf1f17d17ac28455b07d3575 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Mon, 21 Nov 2016 02:49:50 -0500 Subject: Support MESSAGE_REACTION_REMOVE_ALL event. --- discord/state.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'discord/state.py') diff --git a/discord/state.py b/discord/state.py index 9df36cf0..6a75491e 100644 --- a/discord/state.py +++ b/discord/state.py @@ -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: -- cgit v1.2.3