fix(Gateway): Export interface (#10060)

* fix(types): export missing `Gateway` interface

* docs(Gateway): update link to `WebSocketManager`
This commit is contained in:
Danial Raza
2023-12-30 18:40:20 +01:00
committed by GitHub
parent 4824ac154d
commit ce84d3efee
2 changed files with 6 additions and 0 deletions

View File

@@ -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 @discordjs/ws#(WebSocketManager:class)}.
*/
export interface Gateway {
getShardCount(): Awaitable<number>;
on(

View File

@@ -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';