Please describe the problem you are having in as much detail as possible:
Every ~40 minutes after startup, my bot is disconnecting. Without reporting an error, and without removing the handlers.
In 11.3.0 this problem is not present.
Include a reproducible code sample here, if possible:
const Discord = require('discord.js');
const client = new Discord.Client();
client.login('token').then(success);
function success() {
console.log('logged in');
}
setInterval(()=>{console.log(client.status)},60000).unref();
client.on('reconnecting', () => {
console.log('reconnecting'); //[1]
});
[1] - After this is called, console.log(client.status) will always output "1", and the handlers will not be removed => the script does not restart.
Further details:
Priority this issue should have – please be realistic and elaborate if possible: hight
[ ] I found this issue while running code on a __user account__
I got the same issue, tought i was my vps guess not. I was going to reinstall my hole vps
Bot just goes offline after 1 hour or so
This should have been fixed with https://github.com/discordjs/discord.js/commit/c8f78b2bf087526ee927e0f00294cd4d8969b7a5.
For now install the 11.3-dev branch from github or revert to version 11.3.0
To install from github (requires git): npm i discordjs/discord.js#11.3-dev
To install 11.3.0: npm i discord.js#11.3.0
Fix has been released simply installing the latest version will do.
Most helpful comment
This should have been fixed with https://github.com/discordjs/discord.js/commit/c8f78b2bf087526ee927e0f00294cd4d8969b7a5.
For now install the 11.3-dev branch from github or revert to version 11.3.0To install from github (requires git):npm i discordjs/discord.js#11.3-devTo install 11.3.0:npm i discord.js#11.3.0Fix has been released simply installing the latest version will do.