mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
types: extend MessageComponentInteractionCollector correctly (#5752)
This commit is contained in:
16
typings/index.d.ts
vendored
16
typings/index.d.ts
vendored
@@ -1354,7 +1354,7 @@ declare module 'discord.js' {
|
||||
public static resolveType(type: MessageComponentTypeResolvable): MessageComponentType;
|
||||
}
|
||||
|
||||
export class MessageComponentInteractionCollector extends Collector<Snowflake, Interaction> {
|
||||
export class MessageComponentInteractionCollector extends Collector<Snowflake, MessageComponentInteraction> {
|
||||
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<void>): this;
|
||||
public on(
|
||||
event: 'collect' | 'dispose',
|
||||
listener: (interaction: MessageComponentInteraction) => Awaited<void>,
|
||||
): this;
|
||||
public on(
|
||||
event: 'end',
|
||||
listener: (collected: Collection<Snowflake, Interaction>, reason: string) => Awaited<void>,
|
||||
listener: (collected: Collection<Snowflake, MessageComponentInteraction>, reason: string) => Awaited<void>,
|
||||
): this;
|
||||
public on(event: string, listener: (...args: any[]) => Awaited<void>): this;
|
||||
|
||||
public once(event: 'collect' | 'dispose', listener: (interaction: Interaction) => Awaited<void>): this;
|
||||
public once(
|
||||
event: 'collect' | 'dispose',
|
||||
listener: (interaction: MessageComponentInteraction) => Awaited<void>,
|
||||
): this;
|
||||
public once(
|
||||
event: 'end',
|
||||
listener: (collected: Collection<Snowflake, Interaction>, reason: string) => Awaited<void>,
|
||||
listener: (collected: Collection<Snowflake, MessageComponentInteraction>, reason: string) => Awaited<void>,
|
||||
): this;
|
||||
public once(event: string, listener: (...args: any[]) => Awaited<void>): this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user