I am trying to make a Discord Music Bot (discord.js), but everytime the bot connects to the channel to play music it disconnects instantly.
This is the tutorial I have followed: https://gabrieltanner.org/blog/dicord-music-bot
There are not any errors and the ffmpeg is installed.
I am running the bot on a centos 8 VPS, and I have other bots that work fine (not music ones xD)
2
Answers
In the play function, delete the line that contains
serverQueue.voiceChannel.leave();
.The resulting code should like this:
Maybe you can setTimeout for this