Skip to content

Commit

Permalink
fix(types): export missing Gateway interface
Browse files Browse the repository at this point in the history
  • Loading branch information
sdanialraza committed Dec 28, 2023
1 parent 4824ac1 commit fc159e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/core/src/Gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ import type { Awaitable } from '@discordjs/util';
import type { ManagerShardEventsMap, WebSocketShardEvents } from '@discordjs/ws';
import type { GatewaySendPayload } from 'discord-api-types/v10';

/**
* Gateway-like structure that can be used to interact with an actual WebSocket connection.
* You can provide a custom implementation, useful for running a message broker between your app and your gateway,
* or you can simply use the {@link https://discord.js.org/docs/packages/ws/stable/WebSocketManager:Class | WebSocketManager}
*/
export interface Gateway {
getShardCount(): Awaitable<number>;
on(
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export * from './api/index.js';
export * from './client.js';
export * from './Gateway.js';
export * from './util/index.js';

export * from 'discord-api-types/v10';
Expand Down

0 comments on commit fc159e4

Please sign in to comment.