VoiceState

export class VoiceState extends Base
export class VoiceState extends Base
Represents the voice state for a Guild Member.

Extends

Base
Readonly
channel:VoiceBasedChannel | null
The channel that the member is connected to
channelId:Snowflake | null
The VoiceChannel or StageChannel id the member is in
Readonly
client:Client<true>
The client that instantiated this
Inherited from Base
Readonly
deaf:boolean | null
Whether this member is either self-deafened or server-deafened
guild:Guild
The guild of this voice state
The id of the member of this voice state
Readonly
member:GuildMember | null
The member that this voice state belongs to
Readonly
mute:boolean | null
Whether this member is either self-muted or server-muted
requestToSpeakTimestamp:number | null
The time at which the member requested to speak. This property is specific to stage channels only.
selfDeaf:boolean | null
Whether this member is self-deafened
selfMute:boolean | null
Whether this member is self-muted
selfVideo:boolean | null
Whether this member's camera is enabled
serverDeaf:boolean | null
Whether this member is deafened server-wide
serverMute:boolean | null
Whether this member is muted server-wide
sessionId:string | null
The session id for this member's connection
streaming:boolean | null
Whether this member is streaming using "Screen Share"
suppress:boolean | null
Whether this member is suppressed from speaking. This property is specific to stage channels only.
disconnect(reason?):Promise<GuildMember>
Disconnects the member from the channel.
NameTypeOptionalDescription
reasonstringYesReason for disconnecting the member from the channel
edit(options):Promise<this>
Edits this voice state. Currently only available when in a stage channel
NameTypeOptionalDescription
optionsVoiceStateEditOptionsNoThe options to provide
setChannel(channel, reason?):Promise<GuildMember>
Moves the member to a different channel, or disconnects them from the one they're in.
NameTypeOptionalDescription
channelGuildVoiceChannelResolvable | nullNoChannel to move the member to, or null if you want to disconnect them from voice.
reasonstringYesReason for moving member to another channel or disconnecting
setDeaf(deaf?, reason?):Promise<GuildMember>
Deafens/undeafens the member of this voice state.
NameTypeOptionalDescription
deafbooleanYesWhether or not the member should be deafened
reasonstringYesReason for deafening or undeafening
setMute(mute?, reason?):Promise<GuildMember>
Mutes/unmutes the member of this voice state.
NameTypeOptionalDescription
mutebooleanYesWhether or not the member should be muted
reasonstringYesReason for muting or unmuting
setRequestToSpeak(requestToSpeak?):Promise<this>
Toggles the request to speak in the channel. Only applicable for stage channels and for the client's own voice state.
NameTypeOptionalDescription
requestToSpeakbooleanYesWhether or not the client is requesting to become a speaker.
setSuppressed(suppressed?):Promise<this>
Suppress/unsuppress the user. Only applicable for stage channels.
NameTypeOptionalDescription
suppressedbooleanYesWhether or not the user should be suppressed.
toJSON(...props):unknown
NameTypeOptionalDescription
...propsRecord<string, boolean | string>[]NoNone
Inherited from Base
valueOf():string