Fix ready never firing for truly unavailable guilds

This commit is contained in:
Amish Shah
2016-09-03 21:10:05 +01:00
parent 68acf37fd4
commit 09dee3d46a
2 changed files with 15 additions and 1 deletions

View File

@@ -27,6 +27,12 @@ class ReadyHandler extends AbstractHandler {
client.once('ready', client.syncGuilds.bind(client));
client.setTimeout(() => {
if (!client.ws.normalReady) {
client.ws._emitReady(false);
}
}, 1200 * data.guilds.length);
this.packetManager.ws.sessionID = data.session_id;
this.packetManager.ws.checkIfReady();