typings: correct types for InteractionCollector guild and channel (#7452)

This commit is contained in:
Vlad Frangu
2022-02-13 13:40:12 +02:00
committed by GitHub
parent 532846b1f8
commit 6ce906a02f
2 changed files with 6 additions and 4 deletions

View File

@@ -6,9 +6,9 @@ const Events = require('../util/Events');
/**
* @typedef {CollectorOptions} InteractionCollectorOptions
* @property {TextBasedChannels} [channel] The channel to listen to interactions from
* @property {TextBasedChannelResolvable} [channel] The channel to listen to interactions from
* @property {ComponentType} [componentType] The type of component to listen for
* @property {Guild} [guild] The guild to listen to interactions from
* @property {GuildResolvable} [guild] The guild to listen to interactions from
* @property {InteractionType} [interactionType] The type of interaction to listen for
* @property {number} [max] The maximum total amount of interactions to collect
* @property {number} [maxComponents] The maximum number of components to collect

View File

@@ -4459,9 +4459,9 @@ export type IntegrationType = 'twitch' | 'youtube' | 'discord';
export interface InteractionCollectorOptions<T extends Interaction, Cached extends CacheType = CacheType>
extends CollectorOptions<[T]> {
channel?: TextBasedChannel;
channel?: TextBasedChannelResolvable;
componentType?: ComponentType;
guild?: Guild;
guild?: GuildResolvable;
interactionType?: InteractionType;
max?: number;
maxComponents?: number;
@@ -4976,6 +4976,8 @@ export type GuildTextBasedChannel = Extract<GuildBasedChannel, TextBasedChannel>
export type TextChannelResolvable = Snowflake | TextChannel;
export type TextBasedChannelResolvable = Snowflake | TextBasedChannel;
export type ThreadAutoArchiveDuration = 60 | 1440 | 4320 | 10080 | 'MAX';
export type ThreadChannelResolvable = ThreadChannel | Snowflake;