mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
src: Remove _trace from different places in the WS (#3679)
* src: Remove `ws._trace` from READY * src: Remove `ws._trace` from RESUME * lint: Fix lint by removing unused packet (#7) Co-authored-by: bdistin <bdistin@gmail.com>
This commit is contained in:
parent
f6d1db6a24
commit
684bb1bf36
2 changed files with 3 additions and 6 deletions
|
|
@ -74,8 +74,7 @@ class ReadyHandler extends AbstractHandler {
|
|||
const ws = this.packetManager.ws;
|
||||
|
||||
ws.sessionID = data.session_id;
|
||||
ws._trace = data._trace;
|
||||
client.emit('debug', `READY ${ws._trace.join(' -> ')} ${ws.sessionID}`);
|
||||
client.emit('debug', `READY ${ws.sessionID}`);
|
||||
ws.checkIfReady();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,18 +2,16 @@ const AbstractHandler = require('./AbstractHandler');
|
|||
const Constants = require('../../../../util/Constants');
|
||||
|
||||
class ResumedHandler extends AbstractHandler {
|
||||
handle(packet) {
|
||||
handle() {
|
||||
const client = this.packetManager.client;
|
||||
const ws = client.ws.connection;
|
||||
|
||||
ws._trace = packet.d._trace;
|
||||
|
||||
ws.status = Constants.Status.READY;
|
||||
this.packetManager.handleQueue();
|
||||
|
||||
const replayed = ws.sequence - ws.closeSequence;
|
||||
|
||||
ws.debug(`RESUMED ${ws._trace.join(' -> ')} | replayed ${replayed} events.`);
|
||||
ws.debug(`RESUMED | replayed ${replayed} events.`);
|
||||
client.emit(Constants.Events.RESUME, replayed);
|
||||
ws.heartbeat();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue