Constructor
new VoiceState(guild, data)
Parameters:
Name | Type | Description |
---|---|---|
guild |
Guild | The guild the voice state is part of |
data |
Object | The data for the voice state |
- Source:
Members
(readonly, nullable) channel :VoiceChannel
The channel that the member is connected to
Type:
- Source:
(nullable) channelID :Snowflake
The ID of the voice channel that this member is in
Type:
- Source:
(readonly, nullable) connection :VoiceConnection
If this is a voice state of the client user, then this will refer to the active VoiceConnection for this guild
Type:
- Source:
(readonly, nullable) deaf :boolean
Whether this member is either self-deafened or server-deafened
Type:
- boolean
- Source:
guild :Guild
The guild of this voice state
Type:
- Source:
id :Snowflake
The ID of the member of this voice state
Type:
- Source:
(readonly, nullable) member :GuildMember
The member that this voice state belongs to
Type:
- Source:
(readonly, nullable) mute :boolean
Whether this member is either self-muted or server-muted
Type:
- boolean
- Source:
(nullable) selfDeaf :boolean
Whether this member is self-deafened
Type:
- boolean
- Source:
(nullable) selfMute :boolean
Whether this member is self-muted
Type:
- boolean
- Source:
selfVideo :boolean
Whether this member's camera is enabled
Type:
- boolean
- Source:
(nullable) serverDeaf :boolean
Whether this member is deafened server-wide
Type:
- boolean
- Source:
(nullable) serverMute :boolean
Whether this member is muted server-wide
Type:
- boolean
- Source:
(nullable) sessionID :string
The session ID of this member's connection
Type:
- string
- Source:
(readonly, nullable) speaking :boolean
Whether this member is currently speaking. A boolean if the information is available (aka
the bot is connected to any voice channel in the guild), otherwise this is null
Type:
- boolean
- Source:
streaming :boolean
Whether this member is streaming using "Go Live"
Type:
- boolean
- Source:
Methods
kick(reasonopt) → {Promise.<GuildMember>}
Kicks the member from the voice channel.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
reason |
string |
<optional> |
Reason for kicking member from the channel |
- Source:
Returns:
- Type
- Promise.<GuildMember>
setChannel(channelopt, reasonopt) → {Promise.<GuildMember>}
Moves the member to a different channel, or disconnects them from the one they're in.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
channel |
ChannelResolvable | null |
<optional> |
Channel to move the member to, or `null` if you want to disconnect them from voice. |
reason |
string |
<optional> |
Reason for moving member to another channel or disconnecting |
- Source:
Returns:
- Type
- Promise.<GuildMember>
setDeaf(deaf, reasonopt) → {Promise.<GuildMember>}
Deafens/undeafens the member of this voice state.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
deaf |
boolean | Whether or not the member should be deafened | |
reason |
string |
<optional> |
Reason for deafening or undeafening |
- Source:
Returns:
- Type
- Promise.<GuildMember>
setMute(mute, reasonopt) → {Promise.<GuildMember>}
Mutes/unmutes the member of this voice state.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
mute |
boolean | Whether or not the member should be muted | |
reason |
string |
<optional> |
Reason for muting or unmuting |
- Source:
Returns:
- Type
- Promise.<GuildMember>
(async) setSelfDeaf(deaf) → {Promise.<boolean>}
Self-deafens/undeafens the bot for this voice state.
Parameters:
Name | Type | Description |
---|---|---|
deaf |
boolean | Whether or not the bot should be self-deafened |
- Source:
Returns:
true if the voice state was successfully updated, otherwise false
- Type
- Promise.<boolean>
(async) setSelfMute(mute) → {Promise.<boolean>}
Self-mutes/unmutes the bot for this voice state.
Parameters:
Name | Type | Description |
---|---|---|
mute |
boolean | Whether or not the bot should be self-muted |
- Source:
Returns:
true if the voice state was successfully updated, otherwise false
- Type
- Promise.<boolean>