From 354fe2a7be23e7c5cac0b0fee1166a6f26216a16 Mon Sep 17 00:00:00 2001 From: Cinnamon <71698422+aiko-chan-ai@users.noreply.github.com> Date: Fri, 1 Jul 2022 09:59:57 +0700 Subject: [PATCH] types: add missing shard types (v13) v13.9.0 #8192 --- src/client/websocket/WebSocketShard.js | 4 ++++ typings/index.d.ts | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) 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]; }