From 802f6c91d4301d7e3ca54104d877633015931480 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Mon, 21 Nov 2016 02:15:03 -0500 Subject: [PATCH] Add Message.clear_reactions --- discord/message.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/discord/message.py b/discord/message.py index 7c41efa34..cbe794add 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)