mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 09:33:32 +01:00
add constants, some debug stuff (#791)
* add constants, some debug stuff * i can't believe i did this
This commit is contained in:
@@ -221,7 +221,7 @@ class WebSocketManager extends EventEmitter {
|
||||
|
||||
this.client.emit('raw', packet);
|
||||
|
||||
if (packet.op === 10) this.client.manager.setupKeepAlive(packet.d.heartbeat_interval);
|
||||
if (packet.op === Constants.OPCodes.HELLO) this.client.manager.setupKeepAlive(packet.d.heartbeat_interval);
|
||||
return this.packetManager.handle(packet);
|
||||
}
|
||||
|
||||
|
||||
@@ -77,6 +77,8 @@ class WebSocketPacketManager {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (packet.op === Constants.OPCodes.HEARTBEAT_ACK) this.ws.client.emit('debug', 'HEARTBEAT ACK');
|
||||
|
||||
if (this.ws.status === Constants.Status.RECONNECTING) {
|
||||
this.ws.reconnecting = false;
|
||||
this.ws.checkIfReady();
|
||||
|
||||
Reference in New Issue
Block a user