mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
Removes the trace packet (#3312)
* Removes the trace packet * Update src/client/websocket/WebSocketShard.js Co-Authored-By: Amish Shah <amishshah.2k@gmail.com> * Update src/client/websocket/WebSocketShard.js Co-Authored-By: Amish Shah <amishshah.2k@gmail.com>
This commit is contained in:
parent
5154850a54
commit
5aa9425040
2 changed files with 2 additions and 12 deletions
|
|
@ -84,13 +84,6 @@ class WebSocketShard extends EventEmitter {
|
|||
*/
|
||||
this.lastHeartbeatAcked = true;
|
||||
|
||||
/**
|
||||
* List of servers the shard is connected to
|
||||
* @type {string[]}
|
||||
* @private
|
||||
*/
|
||||
this.trace = [];
|
||||
|
||||
/**
|
||||
* Contains the rate limit queue and metadata
|
||||
* @type {Object}
|
||||
|
|
@ -368,9 +361,8 @@ class WebSocketShard extends EventEmitter {
|
|||
this.emit(ShardEvents.READY);
|
||||
|
||||
this.sessionID = packet.d.session_id;
|
||||
this.trace = packet.d._trace;
|
||||
this.status = Status.READY;
|
||||
this.debug(`READY ${this.trace.join(' -> ')} | Session ${this.sessionID}.`);
|
||||
this.debug(`READY | Session ${this.sessionID}.`);
|
||||
this.lastHeartbeatAcked = true;
|
||||
this.sendHeartbeat();
|
||||
break;
|
||||
|
|
@ -381,10 +373,9 @@ class WebSocketShard extends EventEmitter {
|
|||
*/
|
||||
this.emit(ShardEvents.RESUMED);
|
||||
|
||||
this.trace = packet.d._trace;
|
||||
this.status = Status.READY;
|
||||
const replayed = packet.s - this.closeSequence;
|
||||
this.debug(`RESUMED ${this.trace.join(' -> ')} | Session ${this.sessionID} | Replayed ${replayed} events.`);
|
||||
this.debug(`RESUMED | Session ${this.sessionID} | Replayed ${replayed} events.`);
|
||||
this.lastHeartbeatAcked = true;
|
||||
this.sendHeartbeat();
|
||||
}
|
||||
|
|
|
|||
1
typings/index.d.ts
vendored
1
typings/index.d.ts
vendored
|
|
@ -1356,7 +1356,6 @@ declare module 'discord.js' {
|
|||
private sessionID?: string;
|
||||
private lastPingTimestamp: number;
|
||||
private lastHeartbeatAcked: boolean;
|
||||
private trace: string[];
|
||||
private ratelimit: { queue: object[]; total: number; remaining: number; time: 60e3; timer: NodeJS.Timeout | null; };
|
||||
private connection: WebSocket | null;
|
||||
private helloTimeout: NodeJS.Timeout | null;
|
||||
|
|
|
|||
Loading…
Reference in a new issue