#Sub command and sub command group
1 messages · Page 1 of 1 (latest)
one sec
its big
module.exports = {
data: new SlashCommandBuilder()
.setName('mention')
.setDescription('Ping for the following events in the server!')
.addSubcommand(subcommand =>
subcommand
.setName('dank')
.setDescription('Ping for a dank giveaway!')
.addUserOption(option => option.setName('donor').setDescription('The user who donated for the giveaway.').setRequired(true))
.addStringOption(option => option.setName('message').setDescription('The message which the donor wants to say.').setRequired(false)))
.addSubcommand(subcommand =>
subcommand
.setName('owo')
.setDescription('Ping for an owo giveaway!'))
.addUserOption(option => option.setName('donor').setDescription('The user who donated for the giveaway.').setRequired(true))
.addStringOption(option => option.setName('message').setDescription('The message which the donor wants to say.').setRequired(false))
.addSubcommand(subcommand =>
subcommand
.setName('poke')
.setDescription('Ping for a pokemon giveaway!'))
.addUserOption(option => option.setName('donor').setDescription('The user who donated for the giveaway.').setRequired(true))
.addStringOption(option => option.setName('message').setDescription('The message which the donor wants to say.').setRequired(false))
.addSubcommand(subcommand =>
subcommand
.setName('anigame')
.setDescription('Ping for an anigame giveaway!'))
.addUserOption(option => option.setName('donor').setDescription('The user who donated for the giveaway.').setRequired(true))
.addStringOption(option => option.setName('message').setDescription('The message which the donor wants to say.').setRequired(false))
.addSubcommand(subcommand =>
subcommand
.setName('heist')
.setDescription('Ping for a heist!'))
.addUserOption(option => option.setName('donor').setDescription('The user who donated for the giveaway.').setRequired(true))
.addStringOption(option => option.setName('message').setDescription('The message which the donor wants to say.').setRequired(false))
}```
Interesting, that looks fine, just SubCommands should be a-ok
Yea, can't be this command then 🤔
DiscordAPIError[50035]: Invalid Form Body
options[2][APPLICATION_COMMAND_OPTIONS_TYPE_INVALID]: Sub-command and sub-command group option types are mutually exclusive to all other types
options[3][APPLICATION_COMMAND_OPTIONS_TYPE_INVALID]: Sub-command and sub-command group option types are mutually exclusive to all other types
options[5][APPLICATION_COMMAND_OPTIONS_NAME_INVALID]: Option name donor is already used in these options
options[6][APPLICATION_COMMAND_OPTIONS_NAME_INVALID]: Option name message is already used in these options
options[8][APPLICATION_COMMAND_OPTIONS_NAME_INVALID]: Option name donor is already used in these options
options[9][APPLICATION_COMMAND_OPTIONS_NAME_INVALID]: Option name message is already used in these options
options[11][APPLICATION_COMMAND_OPTIONS_NAME_INVALID]: Option name donor is already used in these options
options[12][APPLICATION_COMMAND_OPTIONS_NAME_INVALID]: Option name message is already used in these options
You seem to have a command with 13 or more options, find that
13??
Well this isn't a lot to go on:
options[2][APPLICATION_COMMAND_OPTIONS_TYPE_INVALID]: Sub-command and sub-command group option types are mutually exclusive to all other types
options[3][APPLICATION_COMMAND_OPTIONS_TYPE_INVALID]: Sub-command and sub-command group option types are mutually exclusive to all other types
Find what commands you have that have both sub, and sub-command groups
Sub-command and sub-command group option types are mutually exclusive to all other types
There has to be
Because that's what the error says you have
mhm
does having dank in one cmd
and also having it as an option in different cmd count as this error?
All I know is what the error says
hmm
code: 50035,
errors: {
options: {
'2': { _errors: [ [Object] ] },
'3': { _errors: [ [Object] ] },
'5': { _errors: [ [Object] ] },
'6': { _errors: [ [Object] ] },
'8': { _errors: [ [Object] ] },
'9': { _errors: [ [Object] ] },
'11': { _errors: [ [Object] ] },
'12': { _errors: [ [Object] ] }
}
},
message: 'Invalid Form Body'
},
code: 50035,
status: 400,
method: 'PUT',
url: 'https://discord.com/api/v10/applications/1056541924556816494/commands'
}```
what do those numbers mean
Perhaps "second" command, but they do match the options[x]
You're gonna want to console.log what you send to that API call when it errors, so you can debug it
what do i log?
"what you send to that API call"