mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01: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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user