aboutsummaryrefslogtreecommitdiff
path: root/docs/api.rst
diff options
context:
space:
mode:
authorRapptz <[email protected]>2019-03-18 05:29:38 -0400
committerRapptz <[email protected]>2019-03-18 05:29:38 -0400
commit963cf4b34e1de5cba4879689894f6ccb84cf3d9f (patch)
treebd4fb32a226652540e81f23cbc9ddab79c422da6 /docs/api.rst
parent[commands] Walk through MRO for Cog derived classes. (diff)
downloaddiscord.py-963cf4b34e1de5cba4879689894f6ccb84cf3d9f.tar.xz
discord.py-963cf4b34e1de5cba4879689894f6ccb84cf3d9f.zip
Add on_disconnect event.
I assume this is where it has to be. Fix #1937
Diffstat (limited to 'docs/api.rst')
-rw-r--r--docs/api.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/api.rst b/docs/api.rst
index de55e6f5..0579cb79 100644
--- a/docs/api.rst
+++ b/docs/api.rst
@@ -103,6 +103,14 @@ to handle it, which defaults to print a traceback and ignoring the exception.
The warnings on :func:`on_ready` also apply.
+.. function:: on_disconnect()
+
+ Called when the client has disconnected from Discord. This could happen either through
+ the internet being disconnect, explicit calls to logout, or Discord terminating the connection
+ one way or the other.
+
+ This function can be called many times.
+
.. function:: on_ready()
Called when the client is done preparing the data received from Discord. Usually after login is successful