aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--discord/reaction.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/discord/reaction.py b/discord/reaction.py
index 03b6b215..6edd29a6 100644
--- a/discord/reaction.py
+++ b/discord/reaction.py
@@ -93,6 +93,34 @@ class Reaction:
def __repr__(self):
return '<Reaction emoji={0.emoji!r} me={0.me} count={0.count}>'.format(self)
+ async def remove(self, user):
+ """|coro|
+
+ Remove the reaction by the provided :class:`User` from the message.
+
+ If the reaction is not your own (i.e. ``user`` parameter is not you) then
+ the :attr:`discord.permissions.Permissions.manage_messages` permission is needed.
+
+ The ``user`` parameter must represent a user or member and meet
+ the :class:`abc.Snowflake` abc.
+
+ Parameters
+ -----------
+ user: :class:`abc.Snowflake`
+ The user or member from which to remove the reaction.
+
+ Raises
+ -------
+ HTTPException
+ Removing the reaction failed.
+ Forbidden
+ You do not have the proper permissions to remove the reaction.
+ NotFound
+ The user you specified, or the reaction's message was not found.
+ """
+
+ await self.message.remove_reaction(self.emoji, user)
+
def users(self, limit=None, after=None):
"""Returns an :class:`AsyncIterator` representing the users that have reacted to the message.