How to make the bot leave a voice chat?
I have tried several options:
none working.
none working.
let connection = getVoiceConnection(interaction.guild.id);
if (connection === undefined) {
await interaction.reply("I am not in a vc!");
return;
};
connection.destroy();interaction.guild.members.me.voice.channel.leave()interaction.guild.member.voice.channel.leave()npm list discord.js and node node -v version?✅ Marked as resolved by OP
connection.destroy() should make the bot leave the voice channelgetVoiceConnection()?me.voice.disconnect()npm list discord.jsnode -v✅connection.destroy()getVoiceConnection()me.voice.disconnect()