K
Docs
API ReferenceEvent TypesVoice state changes
🎙️

Voice state changes

voiceStateUpdateVOICE_STATE_UPDATETrigger

Fires when a member joins, leaves, or moves voice channels.

When to use this
  • Voice join/leave logging
  • Auto-move or channel stats

On the canvas

This is what the trigger looks like in your bot's Triggers tab. The sparks listed are available in every node inside the linked flow.

🎙️
Voice state changes
voiceStateUpdate
Trigger
Sparks in this flow
{{input.guild.id}}Your Discord server's unique ID
{{input.guild.name}}Your server's name
{{input.guild.memberCount}}How many members are in the server
{{voice.userId}}Discord ID of the user who changed voice state
{{voice.channelId}}Voice channel ID (empty string if they left)
{{voice.joined}}True when the user joined a voice channel
{{voice.left}}True when the user left a voice channel

Available sparks

Use these in any piece config field inside flows triggered by this event.

SparkTypeDescription
{{input.guild.id}}stringYour Discord server's unique ID
{{input.guild.name}}stringYour server's name
{{input.guild.memberCount}}stringHow many members are in the server
{{voice.userId}}stringDiscord ID of the user who changed voice state
{{voice.channelId}}stringVoice channel ID (empty string if they left)
{{voice.joined}}booleanTrue when the user joined a voice channel
{{voice.left}}booleanTrue when the user left a voice channel
📐

In TypeScript, this would be…

Not something you need to write — Kitcord registers these listeners automatically from your Kit.

TypeScript
client.on("voiceStateUpdate", (oldState, newState) => {
  // {{voice.userId}}, {{voice.joined}}, {{voice.left}}
});