diff --git a/src/client/websocket/WebSocketShard.js b/src/client/websocket/WebSocketShard.js index 373e71a..e1a7de3 100644 --- a/src/client/websocket/WebSocketShard.js +++ b/src/client/websocket/WebSocketShard.js @@ -466,6 +466,10 @@ class WebSocketShard extends EventEmitter { // Set the status to reconnecting this.status = Status.RECONNECTING; // Finally, emit the INVALID_SESSION event + /** + * Emitted when the session has been invalidated. + * @event WebSocketShard#invalidSession + */ this.emit(ShardEvents.INVALID_SESSION); break; case Opcodes.HEARTBEAT_ACK: diff --git a/typings/index.d.ts b/typings/index.d.ts index c4be9f6..92371dc 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -2262,8 +2262,8 @@ export class SelectMenuInteraction extends } export interface ShardEventTypes { - spawn: [child: ChildProcess]; - death: [child: ChildProcess]; + spawn: [process: ChildProcess | Worker]; + death: [process: ChildProcess | Worker]; disconnect: []; ready: []; reconnecting: []; @@ -2929,6 +2929,7 @@ export interface WebSocketShardEvents { ready: []; resumed: []; invalidSession: []; + destroyed: []; close: [event: CloseEvent]; allReady: [unavailableGuilds?: Set]; }