Error while trying to make command register
Hello,
I'm trying to make register-command.js file to store my slash commands in but it returns a error. I'll say right away that I'm totally new to programming so I'm copying code from YT tutorial while trying to understand it. This is the code for register-commands.js
and this is the error I cannot get rid of (I had checked many times but hadn't found any mistake and I couldn't find any help either)
9 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 OPUnknown User•14mo ago
Message Not Public
Sign In & Join Server To View
Excuse me please I'm new to programming so I don't understand the exact terminology. What exactly are you pointing at? 😅
must be
Change
name: "Hey"
to name: "hey"
Make the command name from "Hey" to "hey", they can not contain capitalized letters
ok I'll do it and test it but I'm pretty sure that's not the problem because in the code it runs succesfully at least to the line
console.log("Registrování lomítkových příkazů...");
because you can see this in console
Registrování lomítkových příkazů...
but it nevers logs out this message
console.log("Lomítkové příkazy zaregistrovány")
Or am I wrong?This error occurs WHILE registering the comamnds to the API so the above log should work, but wont register the command for you.
ok
Ok I was wrong (again) thank you so so much for help.
Note to myself: Don't focus on single part of code error might be somewhere else even it looks good
Great 👍