mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 20:43:30 +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;
|
public static resolveType(type: MessageComponentTypeResolvable): MessageComponentType;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class MessageComponentInteractionCollector extends Collector<Snowflake, Interaction> {
|
export class MessageComponentInteractionCollector extends Collector<Snowflake, MessageComponentInteraction> {
|
||||||
constructor(
|
constructor(
|
||||||
source: Message | TextChannel | NewsChannel | DMChannel,
|
source: Message | TextChannel | NewsChannel | DMChannel,
|
||||||
filter: CollectorFilter<[MessageComponentInteraction]>,
|
filter: CollectorFilter<[MessageComponentInteraction]>,
|
||||||
@@ -1374,17 +1374,23 @@ declare module 'discord.js' {
|
|||||||
|
|
||||||
public collect(interaction: Interaction): Snowflake;
|
public collect(interaction: Interaction): Snowflake;
|
||||||
public dispose(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(
|
public on(
|
||||||
event: 'end',
|
event: 'end',
|
||||||
listener: (collected: Collection<Snowflake, Interaction>, reason: string) => Awaited<void>,
|
listener: (collected: Collection<Snowflake, MessageComponentInteraction>, reason: string) => Awaited<void>,
|
||||||
): this;
|
): this;
|
||||||
public on(event: string, listener: (...args: any[]) => 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(
|
public once(
|
||||||
event: 'end',
|
event: 'end',
|
||||||
listener: (collected: Collection<Snowflake, Interaction>, reason: string) => Awaited<void>,
|
listener: (collected: Collection<Snowflake, MessageComponentInteraction>, reason: string) => Awaited<void>,
|
||||||
): this;
|
): this;
|
||||||
public once(event: string, listener: (...args: any[]) => Awaited<void>): this;
|
public once(event: string, listener: (...args: any[]) => Awaited<void>): this;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user