!Artimum
!Artimum
DIAdiscord.js - Imagine an app
Created by !Artimum on 1/2/2024 in #djs-questions
command name is invalid
hi guys i get this error its my first time making slash command bot and i just cloned that code from a github repo
throw new DiscordAPIError(request.path, data, request.method, res.status);
^

DiscordAPIError: Invalid Form Body
options[0].name: Command name is invalid
at RequestHandler.execute (D:\CODING\Discord bot\discord-slash-bot\node_modules\discord.js\src\rest\RequestHandler.js:154:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async RequestHandler.push (D:\CODING\Discord bot\discord-slash-bot\node_modules\discord.js\src\rest\RequestHandler.js:39:14)
at async Client.<anonymous> (D:\CODING\Discord bot\discord-slash-bot\app.js:14:3) {
method: 'post',
path: '/applications/1191799930591916122/commands',
code: 50035,
httpStatus: 400
}
throw new DiscordAPIError(request.path, data, request.method, res.status);
^

DiscordAPIError: Invalid Form Body
options[0].name: Command name is invalid
at RequestHandler.execute (D:\CODING\Discord bot\discord-slash-bot\node_modules\discord.js\src\rest\RequestHandler.js:154:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async RequestHandler.push (D:\CODING\Discord bot\discord-slash-bot\node_modules\discord.js\src\rest\RequestHandler.js:39:14)
at async Client.<anonymous> (D:\CODING\Discord bot\discord-slash-bot\app.js:14:3) {
method: 'post',
path: '/applications/1191799930591916122/commands',
code: 50035,
httpStatus: 400
}
4 replies