File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,20 @@ import type { Awaitable } from '@discordjs/util';
22import type { ManagerShardEventsMap , WebSocketShardEvents } from '@discordjs/ws' ;
33import type { GatewaySendPayload } from 'discord-api-types/v10' ;
44
5+ /**
6+ * A Discord gateway-like interface that can be used to send & recieve events.
7+ */
58export interface Gateway {
9+ /**
10+ * Gets how many shards your bot is running.
11+ */
612 getShardCount ( ) : Awaitable < number > ;
713 on (
814 event : WebSocketShardEvents . Dispatch ,
915 listener : ( ...params : ManagerShardEventsMap [ WebSocketShardEvents . Dispatch ] ) => Awaitable < void > ,
1016 ) : this;
17+ /**
18+ * Sends a payload to the specified shard
19+ */
1120 send ( shardId : number , payload : GatewaySendPayload ) : Awaitable < void > ;
1221}
You can’t perform that action at this time.
0 commit comments