diff options
| author | Rapptz <[email protected]> | 2016-11-21 02:49:50 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2016-11-21 02:49:50 -0500 |
| commit | 92c3c2804d7f543adf1f17d17ac28455b07d3575 (patch) | |
| tree | 06df5ca600680b7256d0ff043afe339d9ae39e94 /discord | |
| parent | Add missing bucket for endpoints. (diff) | |
| download | discord.py-92c3c2804d7f543adf1f17d17ac28455b07d3575.tar.xz discord.py-92c3c2804d7f543adf1f17d17ac28455b07d3575.zip | |
Support MESSAGE_REACTION_REMOVE_ALL event.
Diffstat (limited to 'discord')
| -rw-r--r-- | discord/state.py | 7 |
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: |