From c6696d839913a95663e68cd185eb5001174ad456 Mon Sep 17 00:00:00 2001 From: monbrey Date: Sat, 5 Jun 2021 20:04:31 +1000 Subject: [PATCH] types: extend MessageComponentInteractionCollector correctly (#5752) --- typings/index.d.ts | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/typings/index.d.ts b/typings/index.d.ts index 93e153207..493b81d6f 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1354,7 +1354,7 @@ declare module 'discord.js' { public static resolveType(type: MessageComponentTypeResolvable): MessageComponentType; } - export class MessageComponentInteractionCollector extends Collector { + export class MessageComponentInteractionCollector extends Collector { constructor( source: Message | TextChannel | NewsChannel | DMChannel, filter: CollectorFilter<[MessageComponentInteraction]>, @@ -1374,17 +1374,23 @@ declare module 'discord.js' { public collect(interaction: Interaction): Snowflake; public dispose(interaction: Interaction): Snowflake; - public on(event: 'collect' | 'dispose', listener: (interaction: Interaction) => Awaited): this; + public on( + event: 'collect' | 'dispose', + listener: (interaction: MessageComponentInteraction) => Awaited, + ): this; public on( event: 'end', - listener: (collected: Collection, reason: string) => Awaited, + listener: (collected: Collection, reason: string) => Awaited, ): this; public on(event: string, listener: (...args: any[]) => Awaited): this; - public once(event: 'collect' | 'dispose', listener: (interaction: Interaction) => Awaited): this; + public once( + event: 'collect' | 'dispose', + listener: (interaction: MessageComponentInteraction) => Awaited, + ): this; public once( event: 'end', - listener: (collected: Collection, reason: string) => Awaited, + listener: (collected: Collection, reason: string) => Awaited, ): this; public once(event: string, listener: (...args: any[]) => Awaited): this; }