Handle VOICE_STATE_UPDATE websocket events.
This adds a lot of new attributes into the Member class such as giving a voice_channel that the user is currently connected to. Initially there was a plan to have a voice_members attribute in the Channel class but this proved to be difficult when it came to actually removing users from the voice channel as the response would return channel_id as null. Fixes #16.
This commit is contained in:
12
docs/api.rst
12
docs/api.rst
@ -174,6 +174,18 @@ to handle it, which defaults to log a traceback and ignore the exception.
|
||||
|
||||
:param role: The :class:`Role` that was updated.
|
||||
|
||||
.. function:: on_voice_state_update(member)
|
||||
|
||||
Called when a :class:`Member` changes their voice state.
|
||||
|
||||
The following, but not limited to, examples illustrate when this event is called:
|
||||
|
||||
- A member joins a voice room.
|
||||
- A member leaves a voice room.
|
||||
- A member is muted or deafened by their own accord.
|
||||
- A member is muted or deafened by a server administrator.
|
||||
|
||||
:param member: The :class:`Member` whose voice state changed.
|
||||
|
||||
Utility Functions
|
||||
-----------------
|
||||
|
Reference in New Issue
Block a user