mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user