From ab2512785b16d76a78f33e61a60ce90a2b225233 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Thu, 15 Oct 2015 01:02:15 -0400 Subject: 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. --- docs/api.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'docs') diff --git a/docs/api.rst b/docs/api.rst index 7c15020d..62e41e4d 100644 --- a/docs/api.rst +++ b/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 ----------------- -- cgit v1.2.3