From 8bb37513400d646d784d59875d6b6a6ec10160cd Mon Sep 17 00:00:00 2001 From: Vitor Date: Sat, 5 Feb 2022 13:31:34 +0000 Subject: [PATCH] docs: add supported option types for autocomplete (#7368) --- packages/discord.js/src/structures/ApplicationCommand.js | 8 ++++++-- packages/discord.js/src/structures/CommandInteraction.js | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/discord.js/src/structures/ApplicationCommand.js b/packages/discord.js/src/structures/ApplicationCommand.js index d7daed7f3..4dd6eadea 100644 --- a/packages/discord.js/src/structures/ApplicationCommand.js +++ b/packages/discord.js/src/structures/ApplicationCommand.js @@ -144,7 +144,9 @@ class ApplicationCommand extends Base { * @property {ApplicationCommandOptionType} type The type of the option * @property {string} name The name of the option * @property {string} description The description of the option - * @property {boolean} [autocomplete] Whether the option is an autocomplete option + * @property {boolean} [autocomplete] Whether the autocomplete interaction is enabled for a + * {@link ApplicationCommandOptionType.String}, {@link ApplicationCommandOptionType.Integer} or + * {@link ApplicationCommandOptionType.Number} option * @property {boolean} [required] Whether the option is required * @property {ApplicationCommandOptionChoice[]} [choices] The choices of the option for the user to pick from * @property {ApplicationCommandOptionData[]} [options] Additional options if this option is a subcommand (group) @@ -346,7 +348,9 @@ class ApplicationCommand extends Base { * @property {string} name The name of the option * @property {string} description The description of the option * @property {boolean} [required] Whether the option is required - * @property {boolean} [autocomplete] Whether the option is an autocomplete option + * @property {boolean} [autocomplete] Whether the autocomplete interaction is enabled for a + * {@link ApplicationCommandOptionType.String}, {@link ApplicationCommandOptionType.Integer} or + * {@link ApplicationCommandOptionType.Number} option * @property {ApplicationCommandOptionChoice[]} [choices] The choices of the option for the user to pick from * @property {ApplicationCommandOption[]} [options] Additional options if this option is a subcommand (group) * @property {ChannelType[]} [channelTypes] When the option type is channel, diff --git a/packages/discord.js/src/structures/CommandInteraction.js b/packages/discord.js/src/structures/CommandInteraction.js index abbbf0ee9..5e7f8f4f8 100644 --- a/packages/discord.js/src/structures/CommandInteraction.js +++ b/packages/discord.js/src/structures/CommandInteraction.js @@ -136,7 +136,9 @@ class CommandInteraction extends Interaction { * @typedef {Object} CommandInteractionOption * @property {string} name The name of the option * @property {ApplicationCommandOptionType} type The type of the option - * @property {boolean} [autocomplete] Whether the option is an autocomplete option + * @property {boolean} [autocomplete] Whether the autocomplete interaction is enabled for a + * {@link ApplicationCommandOptionType.String}, {@link ApplicationCommandOptionType.Integer} or + * {@link ApplicationCommandOptionType.Number} option * @property {string|number|boolean} [value] The value of the option * @property {CommandInteractionOption[]} [options] Additional options if this option is a * subcommand (group)