refactor: added TextBasedChannels type (#6286)

This commit is contained in:
Antonio Román
2021-08-04 00:12:51 +02:00
committed by GitHub
parent a72b5a355e
commit 61db5f7618
12 changed files with 42 additions and 45 deletions

View File

@@ -7,7 +7,7 @@ const { InteractionTypes, MessageComponentTypes } = require('../util/Constants')
/**
* @typedef {CollectorOptions} InteractionCollectorOptions
* @property {TextChannel|DMChannel|NewsChannel} [channel] The channel to listen to interactions from
* @property {TextBasedChannels} [channel] The channel to listen to interactions from
* @property {MessageComponentType} [componentType] The type of component to listen for
* @property {Guild} [guild] The guild to listen to interactions from
* @property {InteractionType} [interactionType] The type of interaction to listen for
@@ -39,7 +39,7 @@ class InteractionCollector extends Collector {
/**
* The channel from which to collect interactions, if provided
* @type {?(TextChannel|DMChannel|NewsChannel)}
* @type {?TextBasedChannels}
*/
this.channel = this.message?.channel ?? options.channel ?? null;