Error registering a command
I was registering slash commands and I ran to an error:
Notes: discord.js v13.8.0 and node.js v16
0[DICT_TYPE_CONVERT]: Only dictionaries may be used in a DictType
at SequentialHandler.runRequest (C:\Users\Pooyan\Desktop\PDM Bot\node_modules\@discordjs\rest\dist\index.js:708:15)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async SequentialHandler.queueRequest (C:\Users\Pooyan\Desktop\PDM Bot\node_modules\@discordjs\rest\dist\index.js:511:14) {
rawError: {
code: 50035,
errors: { '0': [Object] },
message: 'Invalid Form Body'
},
code: 50035,
status: 400,
method: 'put',
url: 'https://discord.com/api/v9/applications/966666309909770260/guilds/966987181069598731/commands',
requestBody: { files: undefined, json: [ [Array] ] }
} Promise {
<rejected> DiscordAPIError[50035]: Invalid Form Body
0[DICT_TYPE_CONVERT]: Only dictionaries may be used in a DictType
at SequentialHandler.runRequest (C:\Users\Pooyan\Desktop\PDM Bot\node_modules\@discordjs\rest\dist\index.js:708:15)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async SequentialHandler.queueRequest (C:\Users\Pooyan\Desktop\PDM Bot\node_modules\@discordjs\rest\dist\index.js:511:14) {
rawError: { code: 50035, errors: [Object], message: 'Invalid Form Body' },
code: 50035,
status: 400,
method: 'put',
url: 'https://discord.com/api/v9/applications/966666309909770260/guilds/966987181069598731/commands',
requestBody: { files: undefined, json: [Array] }
}
}Notes: discord.js v13.8.0 and node.js v16