diff options
| author | Rapptz <[email protected]> | 2015-08-21 22:02:03 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2015-08-21 22:02:03 -0400 |
| commit | ef7dd42f2821ccc2a70af96889c653733a91a065 (patch) | |
| tree | 257dad5f5c031ce0b7cd75cecf6463914ee3b18a /docs | |
| parent | Add the ability to delete messages (diff) | |
| download | discord.py-ef7dd42f2821ccc2a70af96889c653733a91a065.tar.xz discord.py-ef7dd42f2821ccc2a70af96889c653733a91a065.zip | |
Add on_message_edit event.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/api.rst | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/docs/api.rst b/docs/api.rst index e407c6e6..dcfc8bbf 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -39,10 +39,16 @@ This page outlines the different types of events listened to by :meth:`Client.ev :param response: The received message response after gone through ``json.loads``. .. function:: on_message_delete(message) +.. function:: on_message_edit(before, after) - Called when a message is deleted from any given server. + Called when a message is deleted or edited from any given server. If the message is not found in the + :attr:`Client.messages` cache, then these events will not be called. This happens if the message + is too old or the client is participating in high traffic servers. To fix this, increase + the ``max_length`` option of :class:`Client`. :param message: A :class:`Message` of the deleted message. + :param before: A :class:`Message` of the previous version of the message. + :param after: A :class:`Message` of the current version of the message. Data Classes |