description |
---|
An event that gets executed, if the bot sees a user updating their voice status. To let the bot listen to the event, add one bot.onVoiceStateUpdate() callback inside your mainfile. |
This callback triggers whenever someone joins a voice channel, leaves a voice channel or updates their vc options.
bot.voiceStateUpdateCommand({ //Command
channel: "id" // Log Channel
code: `code` //Your code
})
bot.voiceStateUpdateCommand({
channel: "772414449839636490"
code: `
$userTag[$newState[id]] has joined the vc $newState[channelName]
$onlyIf[$newState[channelID]!=;]
$onlyIf[$oldState[channelID]==;]
`
})
You can use the functions $newState[] and $oldState[] with the options below to return old and new voice state data.
guildID
=> The ID of the guild the voice state update happened inguildName
=> The name of the guild this voice state update happenedname
=> The name of the user that updated its voice stateid
=> The ID of the user that updated its voice statechannelID
=> The ID of the voice channel this voice state update occurred inchannelName
=> The name of the voice channel this voice state update occurred inserverDeaf
=> Whether the user is server deafenedselfDeaf
=> Whether the user is self deafenedselfMute
=> Whether the user is self mutedserverMute
=> Whether the user is server mutedsessionID
=> The ID of this voice sessionstreaming
=> Whether this user is streamingdeaf
=> Whether the user is either self-deafened or server-deafenedmute
=> Whether the user is either self-muted or server-mutedspeaking
=> Whether the user is speaking