Skip to main content

Voice State Object

Used to represent a user’s voice connection status.
Voice State Structure
FieldTypeDescription
guild_id?snowflakethe guild id this voice state is for
channel_id?snowflakethe channel id this user is connected to
user_idsnowflakethe user id this voice state is for
member?guild member objectthe guild member this voice state is for
session_idstringthe session id for this voice state
deafbooleanwhether this user is deafened by the server
mutebooleanwhether this user is muted by the server
self_deafbooleanwhether this user is locally deafened
self_mutebooleanwhether this user is locally muted
self_stream?booleanwhether this user is streaming using “Go Live”
self_videobooleanwhether this user’s camera is enabled
suppressbooleanwhether this user’s permission to speak is denied
request_to_speak_timestamp?ISO8601 timestampthe time at which the user requested to speak
Example Voice State
{
  "channel_id": "157733188964188161",
  "user_id": "80351110224678912",
  "session_id": "90326bd25d71d39b9ef95b299e3872ff",
  "deaf": false,
  "mute": false,
  "self_deaf": false,
  "self_mute": true,
  "suppress": false,
  "request_to_speak_timestamp": "2021-03-31T18:45:31.297561+00:00"
}

Voice Region Object

Voice Region Structure
FieldTypeDescription
idstringunique ID for the region
namestringname of the region
optimalbooleantrue for a single server that is closest to the current user’s client
deprecatedbooleanwhether this is a deprecated voice region (avoid switching to these)
custombooleanwhether this is a custom voice region (used for events/etc)

List Voice Regions

GET/voice/regions
Returns an array of voice region objects that can be used when setting a voice or stage channel’s rtc_region.

Get Current User Voice State

GET/guilds/{guild.id}/voice-states/@me
Returns the current user’s voice state in the guild.

Get User Voice State

GET/guilds/{guild.id}/voice-states/{user.id}
Returns the specified user’s voice state in the guild.

Modify Current User Voice State

PATCH/guilds/{guild.id}/voice-states/@me
Updates the current user’s voice state. Returns 204 No Content on success. Fires a Voice State Update Gateway event.
JSON Params
FieldTypeDescription
channel_id?snowflakethe id of the channel the user is currently in
suppress?booleantoggles the user’s suppress state
request_to_speak_timestamp??ISO8601 timestampsets the user’s request to speak
Caveats
There are currently several caveats for this endpoint:
  • channel_id must currently point to a stage channel.
  • current user must already have joined channel_id.
  • You must have the MUTE_MEMBERS permission to unsuppress yourself. You can always suppress yourself.
  • You must have the REQUEST_TO_SPEAK permission to request to speak. You can always clear your own request to speak.
  • You are able to set request_to_speak_timestamp to any present or future time.

Modify User Voice State

PATCH/guilds/{guild.id}/voice-states/{user.id}
Updates another user’s voice state. Returns 204 No Content on success. Fires a Voice State Update Gateway event.
JSON Params
FieldTypeDescription
channel_id?snowflakethe id of the channel the user is currently in
suppress?booleantoggles the user’s suppress state
Caveats
There are currently several caveats for this endpoint:
  • channel_id must currently point to a stage channel.
  • User must already have joined channel_id.
  • You must have the MUTE_MEMBERS permission. (Since suppression is the only thing that is available currently.)
  • When unsuppressed, non-bot users will have their request_to_speak_timestamp set to the current time. Bot users will not.
  • When suppressed, the user will have their request_to_speak_timestamp removed.