voice_state
Get the current participants of a voice channel without joining it. Use it to show who is talking in a channel list, or to refresh your view after reconnecting.
Request
Section titled “Request”{ "cmd": "voice_state", "channel": "hangout"}| Field | Type | Required | Description |
|---|---|---|---|
channel |
string | Yes | Name of a voice channel you can view. |
Response
Section titled “Response”{ "cmd": "voice_state", "channel": "hangout", "participants": [ { "id": "usr_3kd9a", "username": "alice", "muted": false }, { "id": "usr_7qp2m", "username": "bob", "muted": true } ]}- Each participant has
id,username, andmuted. - If your account is in the channel, each participant also has
peer_id. Otherwise it is left out. - Users severed from you are left out. See severed users.
- An empty channel returns
"participants": [].
Voice channel objects from channels_get also carry a voice_state array with username and muted for each participant.
Permissions
Section titled “Permissions”You must be able to view the channel.
Errors
Section titled “Errors”val |
When |
|---|---|
Channel name is required |
channel is missing or empty. |
This is not a voice channel |
The channel doesn’t exist or isn’t a voice channel. |
You do not have permission to access this voice channel |
You can’t view the channel. |
