diff options
| author | Rapptz <[email protected]> | 2016-11-17 20:37:33 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2016-11-17 20:37:33 -0500 |
| commit | 18178c26aa9f39d8770d710c6a63a8d1af95ddc8 (patch) | |
| tree | ea2f30e81ec45ac3f51e2d841f9e59b6a31a6804 /discord/client.py | |
| parent | Add atomic add and remove role endpoints to HTTPClient. (diff) | |
| download | discord.py-18178c26aa9f39d8770d710c6a63a8d1af95ddc8.tar.xz discord.py-18178c26aa9f39d8770d710c6a63a8d1af95ddc8.zip | |
Add support for clearing a message's reactions.
Diffstat (limited to 'discord/client.py')
| -rw-r--r-- | discord/client.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/discord/client.py b/discord/client.py index 7b836f30..d2fe4af3 100644 --- a/discord/client.py +++ b/discord/client.py @@ -1043,6 +1043,28 @@ class Client: return [User(**user) for user in data] @asyncio.coroutine + def clear_reactions(self, message): + """|coro| + + Removes all the reactions from a given message. + + You need Manage Messages permission to use this. + + Parameters + ----------- + message: :class:`Message` + The message to remove all reactions from. + + Raises + -------- + HTTPException + Removing the reactions failed. + Forbidden + You do not have the proper permissions to remove all the reactions. + """ + yield from self.http.clear_reactions(message.id, message.channel.id) + + @asyncio.coroutine def send_message(self, destination, content=None, *, tts=False, embed=None): """|coro| |