diff --git a/typings/index.d.ts b/typings/index.d.ts index e7b59f7a4..74bbd79e3 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1637,13 +1637,12 @@ declare module 'discord.js' { public readonly ids: number[]; public mode: ShardingManagerMode; public parentPort: any | null; + public broadcastEval(fn: (client: Client) => T): Promise; + public broadcastEval(fn: (client: Client) => T, options: { shard: number }): Promise; + public broadcastEval(fn: (client: Client, context: P) => T, options: { context: P }): Promise; public broadcastEval( fn: (client: Client, context: P) => T, - { shard: undefined, context: P }?: BroadcastEvalOptions, - ): Promise; - public broadcastEval( - fn: (client: Client, context: P) => T, - { shard: number, context: P }: BroadcastEvalOptions, + options: { context: P; shard: number }, ): Promise; public fetchClientValues(prop: string): Promise; public fetchClientValues(prop: string, shard: number): Promise; @@ -1667,13 +1666,12 @@ declare module 'discord.js' { public totalShards: number | 'auto'; public shardList: number[] | 'auto'; public broadcast(message: any): Promise; + public broadcastEval(fn: (client: Client) => T): Promise; + public broadcastEval(fn: (client: Client) => T, options: { shard: number }): Promise; + public broadcastEval(fn: (client: Client, context: P) => T, options: { context: P }): Promise; public broadcastEval( fn: (client: Client, context: P) => T, - { shard: undefined, context: P }?: BroadcastEvalOptions, - ): Promise; - public broadcastEval( - fn: (client: Client, context: P) => T, - { shard: number, context: P }: BroadcastEvalOptions, + options: { context: P; shard: number }, ): Promise; public createShard(id: number): Shard; public fetchClientValues(prop: string): Promise; @@ -2565,11 +2563,6 @@ declare module 'discord.js' { | N | Readonly>; - interface BroadcastEvalOptions { - shard?: number; - context?: T; - } - type BufferResolvable = Buffer | string; interface ChannelCreationOverwrites {