types(AutocompleteOption): backport fix and improve types
v13.8.1
This commit is contained in:
@@ -240,10 +240,19 @@ class CommandInteractionOptionResolver {
|
||||
return option?.message ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* The full autocomplete option object.
|
||||
* @typedef {Object} AutocompleteFocusedOption
|
||||
* @property {string} name The name of the option
|
||||
* @property {ApplicationCommandOptionType} type The type of the application command option
|
||||
* @property {string} value The value of the option
|
||||
* @property {boolean} focused Whether this option is currently in focus for autocomplete
|
||||
*/
|
||||
|
||||
/**
|
||||
* Gets the focused option.
|
||||
* @param {boolean} [getFull=false] Whether to get the full option object
|
||||
* @returns {string|number|ApplicationCommandOptionChoice}
|
||||
* @returns {string|AutocompleteFocusedOption}
|
||||
* The value of the option, or the whole option if getFull is true
|
||||
*/
|
||||
getFocused(getFull = false) {
|
||||
|
Reference in New Issue
Block a user