diff options
| author | Rapptz <[email protected]> | 2020-01-17 19:48:46 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2020-01-17 19:53:28 -0500 |
| commit | 87f9dcff9c5af9c4fa6e6b148663320522a3c82f (patch) | |
| tree | 2a46dc76aafa9e10ad134c681705684bdb4cf29c /docs | |
| parent | Add support for on_invite_create and on_invite_delete (diff) | |
| download | discord.py-87f9dcff9c5af9c4fa6e6b148663320522a3c82f.tar.xz discord.py-87f9dcff9c5af9c4fa6e6b148663320522a3c82f.zip | |
Add support for clearing a specific reaction.
Closes #2440
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/api.rst | 40 |
1 files changed, 35 insertions, 5 deletions
diff --git a/docs/api.rst b/docs/api.rst index 8c22e0bc..e4302843 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -250,7 +250,8 @@ to handle it, which defaults to print a traceback and ignoring the exception. Messages might not be in cache if the message is too old or the client is participating in high traffic guilds. - If this occurs increase the :attr:`Client.max_messages` attribute. + If this occurs increase the :attr:`Client.max_messages` attribute + or use the :func:`on_raw_message_delete` event instead. :param message: The deleted message. :type message: :class:`Message` @@ -264,7 +265,8 @@ to handle it, which defaults to print a traceback and ignoring the exception. the messages list. Messages might not be in cache if the message is too old or the client is participating in high traffic guilds. - If this occurs increase the :attr:`Client.max_messages` attribute. + If this occurs increase the :attr:`Client.max_messages` attribute + or use the :func:`on_raw_bulk_message_delete` event instead. :param messages: The messages that have been deleted. :type messages: List[:class:`Message`] @@ -298,7 +300,8 @@ to handle it, which defaults to print a traceback and ignoring the exception. Messages might not be in cache if the message is too old or the client is participating in high traffic guilds. - If this occurs increase the :attr:`Client.max_messages` attribute. + If this occurs increase the :attr:`Client.max_messages` attribute + or use the :func:`on_raw_message_edit` event instead. The following non-exhaustive cases trigger this event: @@ -339,7 +342,7 @@ to handle it, which defaults to print a traceback and ignoring the exception. Called when a message has a reaction added to it. Similar to :func:`on_message_edit`, if the message is not found in the internal message cache, then this - event will not be called. + event will not be called. Consider using :func:`on_raw_reaction_add` instead. .. note:: @@ -385,7 +388,7 @@ to handle it, which defaults to print a traceback and ignoring the exception. Called when a message has all its reactions removed from it. Similar to :func:`on_message_edit`, if the message is not found in the internal message cache, then this event - will not be called. + will not be called. Consider using :func:`on_raw_reaction_clear` instead. :param message: The message that had its reactions cleared. :type message: :class:`Message` @@ -400,6 +403,27 @@ to handle it, which defaults to print a traceback and ignoring the exception. :param payload: The raw event payload data. :type payload: :class:`RawReactionClearEvent` +.. function:: on_reaction_clear_emoji(reaction) + + Called when a message has a specific reaction removed from it. Similar to :func:`on_message_edit`, + if the message is not found in the internal message cache, then this event + will not be called. Consider using :func:`on_raw_reaction_clear_emoji` instead. + + .. versionadded:: 1.3.0 + + :param reaction: The reaction that got cleared. + :type reaction: :class:`Reaction` + +.. function:: on_raw_reaction_clear_emoji(payload) + + Called when a message has a specific reaction removed from it. Unlike :func:`on_reaction_clear_emoji` this is called + regardless of the state of the internal message cache. + + .. versionadded:: 1.3.0 + + :param payload: The raw event payload data. + :type payload: :class:`RawReactionClearEmojiEvent` + .. function:: on_private_channel_delete(channel) on_private_channel_create(channel) @@ -2472,6 +2496,12 @@ RawReactionClearEvent .. autoclass:: RawReactionClearEvent() :members: +RawReactionClearEmojiEvent +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. autoclass:: RawReactionClearEmojiEvent() + :members: + .. _discord_api_data: |