Add disabledEvents option to Client (#784)

This commit is contained in:
Programmix
2016-10-09 10:27:31 -07:00
committed by Amish Shah
parent da5183a5d5
commit 4653f88555
2 changed files with 6 additions and 0 deletions

View File

@@ -84,6 +84,8 @@ class WebSocketPacketManager {
this.setSequence(packet.s);
if (this.ws.client.options.disabledEvents.includes(packet.t)) return false;
if (this.ws.status !== Constants.Status.READY) {
if (BeforeReadyWhitelist.indexOf(packet.t) === -1) {
this.queue.push(packet);