node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptionWithChoices.js
/**
     * Adds a choice for this option
     * @param name The name of the choice
     * @param value The value of the choice
     */
Adds a choice for this option
@param name The name of the choice
@param value The value of the choice
Adds a choice for this option @param name The name of the choice @param value The value of the choice
addChoice(name, value) {
        this.choices ?? (this.choices = []);
        Assertions_1.validateMaxChoicesLength(this.choices);
        ow_1.default(name, `${ApplicationCommandOptionTypeNames[this.type]} choice name`, stringPredicate);
        if (this.type === 3 )
            ow_1.default(value, 'string choice value', stringPredicate);
        else
            ow_1.default(value, `${ApplicationCommandOptionTypeNames[this.type]} choice value`, integerPredicate);
        this.choices.push({ name, value });
        return this;
    }
addChoice ( name , value ) { this . choices ?? ( this . choices = [ ] ) ; Assertions_1 . validateMaxChoicesLength ( this . choices ) ; ow_1 . default ( name , ` ${ ApplicationCommandOptionTypeNames [ this . type ] } ` , stringPredicate ) ; if ( this . type === 3 ) ow_1 . default ( value , 'string choice value' , stringPredicate ) ; else ow_1 . default ( value , ` ${ ApplicationCommandOptionTypeNames [ this . type ] } ` , integerPredicate ) ; this . choices . push ( { name , value } ) ; return this ; }
Adds a choice for this option
 @param name The name of the choice
 @param value The value of the choice
Adds a choice for this option @param name The name of the choice @param value The value of the choice
// Validate name // Validate the value /* String */