From 774e9609d27f8b7c195af34b4b48846ddbafea78 Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Sun, 29 Aug 2021 13:23:20 +0100 Subject: [PATCH] typings(CommandInteractionOptionResolver): Document & type thread channels (#6521) --- src/structures/BaseCommandInteraction.js | 2 +- src/structures/CommandInteractionOptionResolver.js | 2 +- typings/index.d.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/structures/BaseCommandInteraction.js b/src/structures/BaseCommandInteraction.js index 36a1a71e5..57e2bab46 100644 --- a/src/structures/BaseCommandInteraction.js +++ b/src/structures/BaseCommandInteraction.js @@ -143,7 +143,7 @@ class BaseCommandInteraction extends Interaction { * subcommand (group) * @property {User} [user] The resolved user * @property {GuildMember|APIGuildMember} [member] The resolved member - * @property {GuildChannel|APIChannel} [channel] The resolved channel + * @property {GuildChannel|ThreadChannel|APIChannel} [channel] The resolved channel * @property {Role|APIRole} [role] The resolved role */ diff --git a/src/structures/CommandInteractionOptionResolver.js b/src/structures/CommandInteractionOptionResolver.js index a5c01e6a8..e74613f45 100644 --- a/src/structures/CommandInteractionOptionResolver.js +++ b/src/structures/CommandInteractionOptionResolver.js @@ -141,7 +141,7 @@ class CommandInteractionOptionResolver { * Gets a channel option. * @param {string} name The name of the option. * @param {boolean} [required=false] Whether to throw an error if the option is not found. - * @returns {?(GuildChannel|APIGuildChannel)} + * @returns {?(GuildChannel|ThreadChannel|APIChannel)} * The value of the option, or null if not set and not required. */ getChannel(name, required = false) { diff --git a/typings/index.d.ts b/typings/index.d.ts index 24a3638af..480803fa3 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -3359,7 +3359,7 @@ export interface CommandInteractionOption { options?: CommandInteractionOption[]; user?: User; member?: GuildMember | APIInteractionDataResolvedGuildMember; - channel?: GuildChannel | APIInteractionDataResolvedChannel; + channel?: GuildChannel | ThreadChannel | APIInteractionDataResolvedChannel; role?: Role | APIRole; message?: Message | APIMessage; }