diff --git a/src/util/utils.ts b/src/util/utils.ts index d65febec9..1cbd16107 100644 --- a/src/util/utils.ts +++ b/src/util/utils.ts @@ -140,9 +140,10 @@ function validateSlashOptionChoices( function validateSlashOptions(options: SlashCommandOption[]) { for (const option of options) { if ( - (option.choices?.length && option.choices.length > 25) || - option.type !== SlashCommandOptionType.STRING && - option.type !== SlashCommandOptionType.INTEGER + option.choices?.length && + (option.choices.length > 25 || + (option.type !== SlashCommandOptionType.STRING && + option.type !== SlashCommandOptionType.INTEGER)) ) { throw new Error(Errors.INVALID_SLASH_OPTIONS_CHOICES); }