diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/api.rst | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/docs/api.rst b/docs/api.rst index 5469f9b8..601a6c01 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -117,6 +117,16 @@ to handle it, which defaults to print a traceback and ignoring the exception. The warnings on :func:`on_ready` also apply. +.. function:: on_shard_connect(shard_id) + + Similar to :func:`on_connect` except used by :class:`AutoShardedClient` + to denote when a particular shard ID has connected to Discord. + + .. versionadded:: 1.4 + + :param shard_id: The shard ID that has connected. + :type shard_id: :class:`int` + .. function:: on_disconnect() Called when the client has disconnected from Discord. This could happen either through @@ -125,6 +135,16 @@ to handle it, which defaults to print a traceback and ignoring the exception. This function can be called many times. +.. function:: on_shard_disconnect(shard_id) + + Similar to :func:`on_disconnect` except used by :class:`AutoShardedClient` + to denote when a particular shard ID has disconnected from Discord. + + .. versionadded:: 1.4 + + :param shard_id: The shard ID that has disconnected. + :type shard_id: :class:`int` + .. function:: on_ready() Called when the client is done preparing the data received from Discord. Usually after login is successful @@ -149,6 +169,16 @@ to handle it, which defaults to print a traceback and ignoring the exception. Called when the client has resumed a session. +.. function:: on_shard_resumed(shard_id) + + Similar to :func:`on_resumed` except used by :class:`AutoShardedClient` + to denote when a particular shard ID has resumed a session. + + .. versionadded:: 1.4 + + :param shard_id: The shard ID that has resumed. + :type shard_id: :class:`int` + .. function:: on_error(event, \*args, \*\*kwargs) Usually when an event raises an uncaught exception, a traceback is |