Api error??

Idk what it meens The error:
Process exited with code 1
Uncaught DiscordAPIError DiscordAPIError[50035]: Invalid Form Body
2.options[0][UNION_TYPE_CHOICES]: Value of field "type" must be one of (5, 7, 6, 9, 4, 11, 8, 1, 10, 2, 3).
3.options[0][UNION_TYPE_CHOICES]: Value of field "type" must be one of (5, 7, 6, 9, 4, 11, 8, 1, 10, 2, 3).
3.options[1][UNION_TYPE_CHOICES]: Value of field "type" must be one of (5, 7, 6, 9, 4, 11, 8, 1, 10, 2, 3).
at runRequest (c:\Users\awash\Downloads\All mob bot\node_modules\@discordjs\rest\dist\index.js:667:15)
at processTicksAndRejections (internal/process/task_queues:95:5)
index.js:667
No debugger available, can not send 'variables'
Process exited with code 1
Uncaught DiscordAPIError DiscordAPIError[50035]: Invalid Form Body
2.options[0][UNION_TYPE_CHOICES]: Value of field "type" must be one of (5, 7, 6, 9, 4, 11, 8, 1, 10, 2, 3).
3.options[0][UNION_TYPE_CHOICES]: Value of field "type" must be one of (5, 7, 6, 9, 4, 11, 8, 1, 10, 2, 3).
3.options[1][UNION_TYPE_CHOICES]: Value of field "type" must be one of (5, 7, 6, 9, 4, 11, 8, 1, 10, 2, 3).
at runRequest (c:\Users\awash\Downloads\All mob bot\node_modules\@discordjs\rest\dist\index.js:667:15)
at processTicksAndRejections (internal/process/task_queues:95:5)
index.js:667
No debugger available, can not send 'variables'
16 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Awashcard0
Awashcard0OP2y ago
djs 14.7.1 node 18.13.0
ShompiFlen
ShompiFlen2y ago
I think you are not specifying the type of the options you are setting can you show how are you building your command? you have at least 2 commands with options, that are throwing these errors
Awashcard0
Awashcard0OP2y ago
This is the template
const { Command } = require("reconlx");
const ee = require('../../settings/embed.json')
const config = require('../../settings/config.json')

module.exports = new Command({
// options
name: '',
description: ``,
userPermissions: [],
category : "",
// command start
run: async ({ client, interaction, args }) => {
// Code
}
})
const { Command } = require("reconlx");
const ee = require('../../settings/embed.json')
const config = require('../../settings/config.json')

module.exports = new Command({
// options
name: '',
description: ``,
userPermissions: [],
category : "",
// command start
run: async ({ client, interaction, args }) => {
// Code
}
})
ShompiFlen
ShompiFlen2y ago
that doesn't make sense it has to be a slash command
Awashcard0
Awashcard0OP2y ago
wdym?
ShompiFlen
ShompiFlen2y ago
do you have any slash commands?
Awashcard0
Awashcard0OP2y ago
yes
ShompiFlen
ShompiFlen2y ago
does this error come up when you try to deploy them to the api?
Awashcard0
Awashcard0OP2y ago
yes they don't show up when I press / in Discord
Squid
Squid2y ago
How are you deploying them?
Awashcard0
Awashcard0OP2y ago
runing the index.js file
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Squid
Squid2y ago
Am I supposed to know what your index.js file looks like? Looks like you're just following a youtube guide, especially since args is a very outdated concept in favor of actual command options
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
monbrey
monbrey2y ago
I have no idea what reconlx is, but if you're using it to define commands you need to seek support from them Or use our builders instead
Want results from more Discord servers?
Add your server