Error if i start my bot visual studio code java script index.js

DiscordAPIError[50035]: Invalid Form Body 1.options[2][APPLICATION_COMMAND_OPTIONS_REQUIRED_INVALID]: Required options must be placed before non-required options
at handleErrors (C:\Users\ALYA060711\Downloads\Discord REALL\node_modules@discordjs\rest\dist\index.js:727:13)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async SequentialHandler.runRequest (C:\Users\ALYA060711\Downloads\Discord REALL\node_modules@discordjs\rest\dist\index.js:1128:23) at async SequentialHandler.queueRequest (C:\Users\ALYA060711\Downloads\Discord REALL\node_modules@discordjs\rest\dist\index.js:959:14) at async _REST.request (C:\Users\ALYA060711\Downloads\Discord REALL\node_modules@discordjs\rest\dist\index.js:1272:22) { requestBody: { files: undefined, json: [ [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object] ] }, rawError: { message: 'Invalid Form Body', code: 50035, errors: { '1': [Object] } }, code: 50035, status: 400, method: 'PUT', url: 'https://discord.com/api/v10/applications/1349401681623781427/guilds/1168802422425137164/commands' }
7 Replies
JavaBot
JavaBot•2w ago
⌛ This post has been reserved for your question.
Hey @Yastrijder! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
JavaBot
JavaBot•2w ago
Please format your code to make it more readable. For java, it should look like this:
​`​`​`​java
public void foo() {

}
​`​`​`​
​`​`​`​java
public void foo() {

}
​`​`​`​
[VyacheslavOA]
[VyacheslavOA]•2w ago
:JavaScript:
Yastrijder
YastrijderOP•2w ago
? Its a error hehhh
[VyacheslavOA]
[VyacheslavOA]•2w ago
It's Java forum, try get help in JavaScript forums
JavaBot
JavaBot•2w ago
This is not a JavaScript server. Java and JavaScript are completely different languages. See: How is JavaScript different from Java?
JavaBot
JavaBot•2w ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.

Did you find this page helpful?