8 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by OPconnection.destroy()
should make the bot leave the voice channel
If it's not working, there is something else wrong with your code.connection is undefined
The bot is in the vc tho
Are you using the correct guildId when running
getVoiceConnection()
?
Like are you running that command in the same guild as where the bot is connected to the voice channel?Yeah ofc
I'm not that dumb to run it elsewhere
it's
me.voice.disconnect()
That happens when there's a network interruption of any kind (e.g. restarting your bot without leaving the voice channel first, etc)Thanks a lot Aman. I thought it's voice.channel.disconnect