diff options
| author | Rapptz <[email protected]> | 2015-10-15 01:02:15 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2015-10-15 01:37:55 -0400 |
| commit | ab2512785b16d76a78f33e61a60ce90a2b225233 (patch) | |
| tree | e18c594f06cea4d8eddca171da967944133e1306 /docs | |
| parent | Handle GUILD_ROLE_UPDATE websocket events. (diff) | |
| download | discord.py-ab2512785b16d76a78f33e61a60ce90a2b225233.tar.xz discord.py-ab2512785b16d76a78f33e61a60ce90a2b225233.zip | |
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.
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 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 ----------------- |