mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
13 lines
487 B
TypeScript
13 lines
487 B
TypeScript
import type { Awaitable } from '@discordjs/util';
|
|
import type { ManagerShardEventsMap, WebSocketShardEvents } from '@discordjs/ws';
|
|
import type { GatewaySendPayload } from 'discord-api-types/v10';
|
|
|
|
export interface Gateway {
|
|
getShardCount(): Awaitable<number>;
|
|
on(
|
|
event: WebSocketShardEvents.Dispatch,
|
|
listener: (...params: ManagerShardEventsMap[WebSocketShardEvents.Dispatch]) => Awaitable<void>,
|
|
): this;
|
|
send(shardId: number, payload: GatewaySendPayload): Awaitable<void>;
|
|
}
|