GuildVoiceStates
(v14), GUILD_VOICE_STATES
(v13).client.on("voiceStateUpdate", (oldState, newState) => {
if (!oldState.channelId && newState.channelId) {
// code
}
});
client.on("voiceStateUpdate", (oldState, newState) => {
if (oldState.channelId && !newState.channelId) {
// code
}
});