Can't use commands of other files
I've made a folder with the commands and i've put there a folder called test for the ping command and the user command. I've done the command handler and it doesn't work. That's how the directory looks.
8 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 OPNode Version: 21.4.0
npm list discord.js: [email protected]
The commands don't appear when i write / with the bot + i have the ping command that normally you do in the index.js but i removed it (https://discord.js.org/docs/packages/discord.js/14.15.3) now i have that one /ping command even if i removed it from the code, instead of having the ping command of my ping.js file.
ping.js:
discord.js
discord.js
discord.js is a powerful Node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
Gist
The commands don't appear when i write / with the bot + i have the ...
The commands don't appear when i write / with the bot + i have the ping command that normally you do in the index.js but i removed it (https://discord.js.org/docs/packages/discord.js/14.15....
Do you mean doing nodemon ping.js stopping it and then doing nodemon index.js?
I didn't
https://discordjs.guide/creating-your-bot/command-deployment.html#guild-commands you mean with the rest.put in this part of documentation?
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
Thanks you!