Bot doesnt register new / Commands

Hello, I am starting with programming in Discord.js, and I was following the Docs, but suddenly new commands wouldn't appear only the old ones worked. I hope someone can help me with that. Also here is my Code: https://github.com/Vogelyt/First-Bot
GitHub
GitHub - Vogelyt/First-Bot
Contribute to Vogelyt/First-Bot development by creating an account on GitHub.
10 Replies
d.js toolkit
d.js toolkit3mo 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
Vogel_YT
Vogel_YTOP3mo ago
There is no Error it starts just as normal but the new commands dont load. My node version is: v22.14.0
treble/luna
treble/luna3mo ago
and are you actually running the deploy script
Vogel_YT
Vogel_YTOP3mo ago
I am running the index.js node index.js
treble/luna
treble/luna3mo ago
so no, you arent that file wont run itself you have to run it to register your commmands
Vogel_YT
Vogel_YTOP3mo ago
How can i do that I mean I could do that with const deployCommands = require('./deploy-commands.js'); right? but then i get an error
treble/luna
treble/luna3mo ago
no you run it just like you run your index basic js node deploy-commands
Vogel_YT
Vogel_YTOP3mo ago
so not node index.js? I have to start it over the deploy-commands.js
treble/luna
treble/luna3mo ago
you first deploy then start your bot you only deploy when you made changes to your commands
Vogel_YT
Vogel_YTOP3mo ago
Ohhh u r so smart Thank U for the help u fixed my issue

Did you find this page helpful?