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
- 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 OPThere is no Error it starts just as normal but the new commands dont load.
My node version is: v22.14.0
and are you actually running the deploy script
I am running the index.js
node index.js
so no, you arent
that file wont run itself
you have to run it to register your commmands
How can i do that
I mean I could do that with
const deployCommands = require('./deploy-commands.js');
right? but then i get an errorno
you run it just like you run your index
basic js
node deploy-commands
so not node index.js?
I have to start it over the deploy-commands.js
you first deploy
then start your bot
you only deploy when you made changes to your commands
Ohhh u r so smart
Thank U for the help u fixed my issue