@satorijs/adapter-discord 3.4.3 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -85,6 +85,8 @@ declare module './gateway' {
85
85
  interface GatewayEvents {
86
86
  /** contains the initial state information */
87
87
  READY: ReadyEvent;
88
+ /** response to Resume */
89
+ RESUMED: {};
88
90
  }
89
91
  }
90
92
  declare module './internal' {
@@ -278,17 +278,26 @@ export interface SessionStartLimit {
278
278
  /** The number of identify requests allowed per 5 seconds */
279
279
  max_concurrency: integer;
280
280
  }
281
+ /** https://discord.com/developers/docs/topics/gateway#get-gateway-example-response */
282
+ export interface GetGatewayResponse {
283
+ url: string;
284
+ }
285
+ /** https://discord.com/developers/docs/topics/gateway#get-gateway-bot-json-response */
286
+ export interface GetGatewayBotResponse extends GetGatewayResponse {
287
+ shards: integer;
288
+ session_start_limit: SessionStartLimit;
289
+ }
281
290
  declare module './internal' {
282
291
  interface Internal {
283
292
  /**
284
293
  * Returns an object with a single valid WSS URL, which the client can use for Connecting. Clients should cache this value and only call this endpoint to retrieve a new URL if they are unable to properly establish a connection using the cached version of the URL.
285
294
  * @see https://discord.com/developers/docs/topics/gateway#get-gateway
286
295
  */
287
- getGateway(): Promise<any>;
296
+ getGateway(): Promise<GetGatewayResponse>;
288
297
  /**
289
298
  * Returns an object based on the information in Get Gateway, plus additional metadata that can help during the operation of large or sharded bots. Unlike the Get Gateway, this route should not be cached for extended periods of time as the value is not guaranteed to be the same per-call, and changes as the bot joins/leaves guilds.
290
299
  * @see https://discord.com/developers/docs/topics/gateway#get-gateway-bot
291
300
  */
292
- getGatewayBot(): Promise<any>;
301
+ getGatewayBot(): Promise<GetGatewayBotResponse>;
293
302
  }
294
303
  }
package/lib/ws.d.ts CHANGED
@@ -7,13 +7,12 @@ export declare class WsClient extends Adapter.WsClient<DiscordBot> {
7
7
  _ping: NodeJS.Timeout;
8
8
  _sessionId: string;
9
9
  _resumeUrl: string;
10
- prepare(): import("ws").WebSocket;
10
+ prepare(): Promise<import("ws").WebSocket>;
11
11
  heartbeat(): void;
12
12
  accept(): void;
13
13
  }
14
14
  export declare namespace WsClient {
15
15
  interface Config extends Adapter.WsClient.Config {
16
- gateway?: string;
17
16
  intents?: number;
18
17
  }
19
18
  const Config: Schema<Config>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@satorijs/adapter-discord",
3
3
  "description": "Discord Adapter for Satorijs",
4
- "version": "3.4.3",
4
+ "version": "3.5.0",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [
@@ -29,7 +29,7 @@
29
29
  "satori"
30
30
  ],
31
31
  "peerDependencies": {
32
- "@satorijs/satori": "^2.1.0"
32
+ "@satorijs/satori": "^2.1.1"
33
33
  },
34
34
  "dependencies": {
35
35
  "file-type": "^16.5.4",