diff options
| author | Rapptz <[email protected]> | 2021-07-31 20:12:40 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2021-07-31 20:12:40 -0400 |
| commit | e2250d402e8ad035b2653eb411c8e744cc9eb3bf (patch) | |
| tree | 8dd84907f1bc8ad8f12ad915191caf5f19b92ea6 /docs | |
| parent | FIx on_thread_member_remove passing in None (diff) | |
| download | discord.py-e2250d402e8ad035b2653eb411c8e744cc9eb3bf.tar.xz discord.py-e2250d402e8ad035b2653eb411c8e744cc9eb3bf.zip | |
Add on_socket_event_type event
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/api.rst | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/api.rst b/docs/api.rst index f1009913..77be49ca 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -297,6 +297,18 @@ to handle it, which defaults to print a traceback and ignoring the exception. :param kwargs: The keyword arguments for the event that raised the exception. +.. function:: on_socket_event_type(event_type) + + Called whenever a websocket event is received from the WebSocket. + + This is mainly useful for logging how many events you are receiving + from the Discord gateway. + + .. versionadded:: 2.0 + + :param event_type: The event type from Discord that is received, e.g. ``'READY'``. + :type event_type: :class:`str` + .. function:: on_socket_raw_receive(msg) Called whenever a message is received from the WebSocket, before |