mirror of
https://github.com/danbulant/discord.js
synced 2026-06-09 09:42:22 +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;
|
this.lastHeartbeatAcked = true;
|
||||||
|
|
||||||
/**
|
|
||||||
* List of servers the shard is connected to
|
|
||||||
* @type {string[]}
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
this.trace = [];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Contains the rate limit queue and metadata
|
* Contains the rate limit queue and metadata
|
||||||
* @type {Object}
|
* @type {Object}
|
||||||
|
|
@ -368,9 +361,8 @@ class WebSocketShard extends EventEmitter {
|
||||||
this.emit(ShardEvents.READY);
|
this.emit(ShardEvents.READY);
|
||||||
|
|
||||||
this.sessionID = packet.d.session_id;
|
this.sessionID = packet.d.session_id;
|
||||||
this.trace = packet.d._trace;
|
|
||||||
this.status = Status.READY;
|
this.status = Status.READY;
|
||||||
this.debug(`READY ${this.trace.join(' -> ')} | Session ${this.sessionID}.`);
|
this.debug(`READY | Session ${this.sessionID}.`);
|
||||||
this.lastHeartbeatAcked = true;
|
this.lastHeartbeatAcked = true;
|
||||||
this.sendHeartbeat();
|
this.sendHeartbeat();
|
||||||
break;
|
break;
|
||||||
|
|
@ -381,10 +373,9 @@ class WebSocketShard extends EventEmitter {
|
||||||
*/
|
*/
|
||||||
this.emit(ShardEvents.RESUMED);
|
this.emit(ShardEvents.RESUMED);
|
||||||
|
|
||||||
this.trace = packet.d._trace;
|
|
||||||
this.status = Status.READY;
|
this.status = Status.READY;
|
||||||
const replayed = packet.s - this.closeSequence;
|
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.lastHeartbeatAcked = true;
|
||||||
this.sendHeartbeat();
|
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 sessionID?: string;
|
||||||
private lastPingTimestamp: number;
|
private lastPingTimestamp: number;
|
||||||
private lastHeartbeatAcked: boolean;
|
private lastHeartbeatAcked: boolean;
|
||||||
private trace: string[];
|
|
||||||
private ratelimit: { queue: object[]; total: number; remaining: number; time: 60e3; timer: NodeJS.Timeout | null; };
|
private ratelimit: { queue: object[]; total: number; remaining: number; time: 60e3; timer: NodeJS.Timeout | null; };
|
||||||
private connection: WebSocket | null;
|
private connection: WebSocket | null;
|
||||||
private helloTimeout: NodeJS.Timeout | null;
|
private helloTimeout: NodeJS.Timeout | null;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue