Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Gateway): Export interface #10060

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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}
sdanialraza marked this conversation as resolved.
Show resolved Hide resolved
*/
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