Discord API Error with Setting Commands

I keep getting this error and I dont know why
DiscordAPIError[50035]: Invalid Form Body
1.options[1].options[0].name[STRING_TYPE_REGEX]: String value did not match validation regex.
at C.runRequest (/home/runner/InvestigationsBot/node_modules/@discordjs/rest/dist/index.js:7:589)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async C.queueRequest (/home/runner/InvestigationsBot/node_modules/@discordjs/rest/dist/index.js:5:3049) {
rawError: {
message: 'Invalid Form Body',
code: 50035,
errors: { '1': [Object] }
},
code: 50035,
status: 400,
method: 'put',
url: 'https://discord.com/api/v9/applications/1173312947385282621/guilds/1171930026460053626/commands',
requestBody: {
files: undefined,
json: [
[Object], [Object],
[Object], [Object],
[Object], [Object],
[Object]
]
}
}
DiscordAPIError[50035]: Invalid Form Body
1.options[1].options[0].name[STRING_TYPE_REGEX]: String value did not match validation regex.
at C.runRequest (/home/runner/InvestigationsBot/node_modules/@discordjs/rest/dist/index.js:7:589)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async C.queueRequest (/home/runner/InvestigationsBot/node_modules/@discordjs/rest/dist/index.js:5:3049) {
rawError: {
message: 'Invalid Form Body',
code: 50035,
errors: { '1': [Object] }
},
code: 50035,
status: 400,
method: 'put',
url: 'https://discord.com/api/v9/applications/1173312947385282621/guilds/1171930026460053626/commands',
requestBody: {
files: undefined,
json: [
[Object], [Object],
[Object], [Object],
[Object], [Object],
[Object]
]
}
}
3 Replies
d.js toolkit
d.js toolkit13mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
treble/luna
treble/luna13mo ago
Command/option names cannot contain spaces or uppercase letters
UnknownPerson
UnknownPersonOP13mo ago
Probably my issue Let me go check Solved that issue. Thank you.
Want results from more Discord servers?
Add your server