Discord.js: Bot silently disconnecting on 11.3.1 after ~40 minutes

Created on 4 Mar 2018  Â·  3Comments  Â·  Source: discordjs/discord.js

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:

  • discord.js version: 11.3.1
  • node.js version: v6.11.2
  • Operating system: windows
  • 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 have also tested the issue on latest master, commit hash:
high already fixed gateway ratelimits bug

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.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.

All 3 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tom-barnes picture tom-barnes  Â·  3Comments

peachyfawx picture peachyfawx  Â·  3Comments

Dmitry221060 picture Dmitry221060  Â·  3Comments

iCrawl picture iCrawl  Â·  3Comments

LLamaFTL picture LLamaFTL  Â·  3Comments