Skip to content

Commit 52173b6

Browse files
fix: disable per option validation on chat input subcommands (#11405)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 41439d3 commit 52173b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/builders/src/interactions/commands/chatInput/ChatInputCommandSubcommands.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export class ChatInputCommandSubcommandGroupBuilder
7474
const data = {
7575
...(structuredClone(rest) as Omit<APIApplicationCommandSubcommandGroupOption, 'type'>),
7676
type: ApplicationCommandOptionType.SubcommandGroup as const,
77-
options: options?.map((option) => option.toJSON(validationOverride)) ?? [],
77+
options: options?.map((option) => option.toJSON(false)) ?? [],
7878
};
7979

8080
validate(chatInputCommandSubcommandGroupPredicate, data, validationOverride);
@@ -107,7 +107,7 @@ export class ChatInputCommandSubcommandBuilder
107107
const data = {
108108
...(structuredClone(rest) as Omit<APIApplicationCommandSubcommandOption, 'type'>),
109109
type: ApplicationCommandOptionType.Subcommand as const,
110-
options: options?.map((option) => option.toJSON(validationOverride)) ?? [],
110+
options: options?.map((option) => option.toJSON(false)) ?? [],
111111
};
112112

113113
validate(chatInputCommandSubcommandPredicate, data, validationOverride);

0 commit comments

Comments
 (0)