mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-10-21 16:03:10 +00:00
Add support for clearing a message's reactions.
This commit is contained in:
@@ -1042,6 +1042,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|
|
||||
|
Reference in New Issue
Block a user