aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2016-11-21 02:15:03 -0500
committerRapptz <[email protected]>2017-01-03 09:52:00 -0500
commit802f6c91d4301d7e3ca54104d877633015931480 (patch)
treebd48e44450d4ccb5b85b1cad69050936f47f12c0
parentChange dict value views into lists. (diff)
downloaddiscord.py-802f6c91d4301d7e3ca54104d877633015931480.tar.xz
discord.py-802f6c91d4301d7e3ca54104d877633015931480.zip
Add Message.clear_reactions
-rw-r--r--discord/message.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/discord/message.py b/discord/message.py
index 7c41efa3..cbe794ad 100644
--- a/discord/message.py
+++ b/discord/message.py
@@ -549,3 +549,21 @@ class Message:
raise InvalidArgument('emoji argument must be a string or discord.Emoji')
yield from self._state.http.remove_reaction(self.id, self.channel.id, emoji, member.id)
+
+ @asyncio.coroutine
+ def clear_reactions(self):
+ """|coro|
+
+ Removes all the reactions from the message.
+
+ You need :attr:`Permissions.manage_messages` permission
+ to use this.
+
+ Raises
+ --------
+ HTTPException
+ Removing the reactions failed.
+ Forbidden
+ You do not have the proper permissions to remove all the reactions.
+ """
+ yield from self._state.http.clear_reactions(self.id, self.channel.id)