#DiscordAPIError[50035]: Invalid Form Body options[0][TAG_FIELD_MISSING]
1 messages · Page 1 of 1 (latest)
A follow up question. Is the resulting command object from the SlashCommandBuilder class directly sent to the Discord API or is it adjusted for default properties?
It's weird because if I don't use SlashCommandBuilder and directly pass in an object (example attached) it seems to work perfectly fine.
So I suspect I'm either missing something, or the SlashCommandBuilder class doesn't pass in the type property for subcommand (and group) options
DiscordAPIError[50035]: Invalid Form Body options[0][TAG_FIELD_MISSING]
Update: The resulting command object IS adjusted before being sent to the Discord API. Using the .toJSON() method added the type property when console logging giving this result.
{
options: [
{
type: 2,
name: 'user',
name_localizations: undefined,
description: 'Configure a user...',
description_localizations: undefined,
options: []
}
],
name: 'configure',
name_localizations: undefined,
description: 'Configure some stuff...',
description_localizations: undefined,
default_permission: undefined,
default_member_permissions: undefined,
dm_permission: undefined,
nsfw: undefined
}