#Bot disconnects from vc after a few days on external host
5 messages · Page 1 of 1 (latest)
• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.
Sounds like a normal reconnect to me. Pass the presence in your client constructor and make sure to (re)join VCs on ready or shardReconnect
This is the code
client.on('ready', async () => {
console.log(`${client.user.tag} started`);
client.user.setActivity('/help', { type: Discord.ActivityType.Playing });
music(client);
});
In the music function, the player and connection are created and the bot should join the vc and start playing music.
As I said, pass the presence: as property in the client constructor to have it persist beyond reconnects