Add on_socket_event_type event

This commit is contained in:
Rapptz
2021-07-31 20:12:40 -04:00
parent 2cb5ce981e
commit e2250d402e
2 changed files with 15 additions and 3 deletions

View File

@ -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