Handle 4011 ws event code (#1083)

* 4011

* Update WebSocketManager.js

* smh gawdl3y
This commit is contained in:
Gus Caplan
2017-01-11 16:59:10 -06:00
committed by Amish Shah
parent b2822c584a
commit a3091f5262
4 changed files with 3 additions and 3 deletions

View File

@@ -35,6 +35,7 @@ class ClientManager {
this.client.ws.once('close', event => {
if (event.code === 4004) reject(new Error(Constants.Errors.BAD_LOGIN));
if (event.code === 4010) reject(new Error(Constants.Errors.INVALID_SHARD));
if (event.code === 4011) reject(new Error(Constants.Errors.SHARDING_REQUIRED));
});
this.client.once(Constants.Events.READY, () => {
resolve(token);