aboutsummaryrefslogtreecommitdiff
path: root/discord/state.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2016-11-21 02:49:50 -0500
committerRapptz <[email protected]>2016-11-21 02:49:50 -0500
commit92c3c2804d7f543adf1f17d17ac28455b07d3575 (patch)
tree06df5ca600680b7256d0ff043afe339d9ae39e94 /discord/state.py
parentAdd missing bucket for endpoints. (diff)
downloaddiscord.py-92c3c2804d7f543adf1f17d17ac28455b07d3575.tar.xz
discord.py-92c3c2804d7f543adf1f17d17ac28455b07d3575.zip
Support MESSAGE_REACTION_REMOVE_ALL event.
Diffstat (limited to 'discord/state.py')
-rw-r--r--discord/state.py7
1 files changed, 7 insertions, 0 deletions
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: