fix: disable per option validation on chat input subcommands (#11405)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Almeida
2026-03-07 00:02:56 +00:00
committed by GitHub
parent 41439d3a40
commit 52173b6ca8

View File

@@ -74,7 +74,7 @@ export class ChatInputCommandSubcommandGroupBuilder
const data = {
...(structuredClone(rest) as Omit<APIApplicationCommandSubcommandGroupOption, 'type'>),
type: ApplicationCommandOptionType.SubcommandGroup as const,
options: options?.map((option) => option.toJSON(validationOverride)) ?? [],
options: options?.map((option) => option.toJSON(false)) ?? [],
};
validate(chatInputCommandSubcommandGroupPredicate, data, validationOverride);
@@ -107,7 +107,7 @@ export class ChatInputCommandSubcommandBuilder
const data = {
...(structuredClone(rest) as Omit<APIApplicationCommandSubcommandOption, 'type'>),
type: ApplicationCommandOptionType.Subcommand as const,
options: options?.map((option) => option.toJSON(validationOverride)) ?? [],
options: options?.map((option) => option.toJSON(false)) ?? [],
};
validate(chatInputCommandSubcommandPredicate, data, validationOverride);