diff options
Diffstat (limited to 'docs/api.rst')
| -rw-r--r-- | docs/api.rst | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/api.rst b/docs/api.rst index f8e0e8b5..b31fa280 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -102,6 +102,13 @@ to handle it, which defaults to print a traceback and ignore the exception. .. versionadded:: 0.7.0 Subclassing to listen to events. +.. function:: on_connect() + + Called when the client has successfully connected to Discord. This is not + the same as the client being fully prepared, see :func:`on_ready` for that. + + The warnings on :func:`on_ready` also apply. + .. function:: on_ready() Called when the client is done preparing the data received from Discord. Usually after login is successful @@ -114,6 +121,13 @@ to handle it, which defaults to print a traceback and ignore the exception. once. This library implements reconnection logic and thus will end up calling this event whenever a RESUME request fails. +.. function:: on_shard_ready(shard_id) + + Similar to :func:`on_ready` except used by :class:`AutoShardedClient` + to denote when a particular shard ID has become ready. + + :param shard_id: The shard ID that is ready. + .. function:: on_resumed() Called when the client has resumed a session. |