diff --git a/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.ts b/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.ts index 88169c8de99b..786196fe6235 100644 --- a/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.ts +++ b/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.ts @@ -20,7 +20,7 @@ export class ApplicationCommandOptionWithChoicesAndAutocompleteMixin { + public addChoice(name: string, value: T): this { if (this.autocomplete) { throw new RangeError('Autocomplete and choices are mutually exclusive to each other.'); } @@ -51,7 +51,7 @@ export class ApplicationCommandOptionWithChoicesAndAutocompleteMixin { + public addChoices(choices: [name: string, value: T][]): this { if (this.autocomplete) { throw new RangeError('Autocomplete and choices are mutually exclusive to each other.'); } @@ -62,11 +62,7 @@ export class ApplicationCommandOptionWithChoicesAndAutocompleteMixin( - choices: Input, - ): Input extends [] - ? this & Pick, 'setAutocomplete'> - : Omit { + public setChoices(choices: [name: string, value: T][]): this { if (choices.length > 0 && this.autocomplete) { throw new RangeError('Autocomplete and choices are mutually exclusive to each other.'); } @@ -83,11 +79,7 @@ export class ApplicationCommandOptionWithChoicesAndAutocompleteMixin( - autocomplete: U, - ): U extends true - ? Omit - : this & Pick, 'addChoice' | 'addChoices'> { + public setAutocomplete(autocomplete: boolean): this { // Assert that you actually passed a boolean booleanPredicate.parse(autocomplete);