mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
refactor: change xID to xId (#6036)
* refactor: change `xID` to `xId` * Update src/managers/MessageManager.js Co-authored-by: Noel <buechler.noel@outlook.com> Co-authored-by: Noel <buechler.noel@outlook.com>
This commit is contained in:
@@ -174,8 +174,8 @@ class WebSocketManager extends EventEmitter {
|
||||
/**
|
||||
* Emitted when a shard turns ready.
|
||||
* @event Client#shardReady
|
||||
* @param {number} id The shard ID that turned ready
|
||||
* @param {?Set<string>} unavailableGuilds Set of unavailable guild IDs, if any
|
||||
* @param {number} id The shard id that turned ready
|
||||
* @param {?Set<string>} unavailableGuilds Set of unavailable guild ids, if any
|
||||
*/
|
||||
this.client.emit(Events.SHARD_READY, shard.id, unavailableGuilds);
|
||||
|
||||
@@ -189,7 +189,7 @@ class WebSocketManager extends EventEmitter {
|
||||
* Emitted when a shard's WebSocket disconnects and will no longer reconnect.
|
||||
* @event Client#shardDisconnect
|
||||
* @param {CloseEvent} event The WebSocket close event
|
||||
* @param {number} id The shard ID that disconnected
|
||||
* @param {number} id The shard id that disconnected
|
||||
*/
|
||||
this.client.emit(Events.SHARD_DISCONNECT, event, shard.id);
|
||||
this.debug(WSCodes[event.code], shard);
|
||||
@@ -198,20 +198,20 @@ class WebSocketManager extends EventEmitter {
|
||||
|
||||
if (UNRESUMABLE_CLOSE_CODES.includes(event.code)) {
|
||||
// These event codes cannot be resumed
|
||||
shard.sessionID = null;
|
||||
shard.sessionId = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Emitted when a shard is attempting to reconnect or re-identify.
|
||||
* @event Client#shardReconnecting
|
||||
* @param {number} id The shard ID that is attempting to reconnect
|
||||
* @param {number} id The shard id that is attempting to reconnect
|
||||
*/
|
||||
this.client.emit(Events.SHARD_RECONNECTING, shard.id);
|
||||
|
||||
this.shardQueue.add(shard);
|
||||
|
||||
if (shard.sessionID) {
|
||||
this.debug(`Session ID is present, attempting an immediate reconnect...`, shard);
|
||||
if (shard.sessionId) {
|
||||
this.debug(`Session id is present, attempting an immediate reconnect...`, shard);
|
||||
this.reconnect();
|
||||
} else {
|
||||
shard.destroy({ reset: true, emit: false, log: false });
|
||||
|
||||
Reference in New Issue
Block a user