diff options
| author | khazhyk <[email protected]> | 2016-10-26 21:34:28 -0700 |
|---|---|---|
| committer | khazhyk <[email protected]> | 2016-10-27 21:36:32 -0700 |
| commit | c4acc0e1a169cebf2adbf974df802ac4b802efec (patch) | |
| tree | 39e30d0ed4093118bf8a76663e9ad5f0937528a7 /docs/api.rst | |
| parent | Add around parameter to LogsFromIterator. (diff) | |
| download | discord.py-c4acc0e1a169cebf2adbf974df802ac4b802efec.tar.xz discord.py-c4acc0e1a169cebf2adbf974df802ac4b802efec.zip | |
Add support for reactions.
Reactions can be be standard emojis, or custom server emojis.
Adds
- add/remove_reaction
- get_reaction_users
- Messages have new field reactions
- new events - message_reaction_add, message_reaction_remove
- new permission - add_reactions
Diffstat (limited to 'docs/api.rst')
| -rw-r--r-- | docs/api.rst | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/api.rst b/docs/api.rst index 641331c4..72162f51 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -207,6 +207,26 @@ to handle it, which defaults to print a traceback and ignore the exception. :param before: A :class:`Message` of the previous version of the message. :param after: A :class:`Message` of the current version of the message. +.. function:: on_message_reaction_add(message, reaction, user) + + Called when a message has a reaction added to it. Similar to on_message_edit, + if the message is not found in the :attr:`Client.messages` cache, then this + event will not be called. + + :param message: A :class:`Message` that was reacted to. + :param reaction: A :class:`Reaction` showing the current state of the reaction. + :param user: A :class:`User` or :class:`Member` of the user who added the reaction. + +.. function:: on_message_reaction_remove(message, reaction, user) + + Called when a message has a reaction removed from it. Similar to on_message_edit, + if the message is not found in the :attr:`Client.messages` cache, then this event + will not be called. + + :param message: A :class:`Message` that was reacted to. + :param reaction: A :class:`Reaction` showing the current state of the reaction. + :param user: A :class:`User` or :class:`Member` of the user who removed the reaction. + .. function:: on_channel_delete(channel) on_channel_create(channel) |