Not just one but all the commands don't work
Not just one but all the commands don't work
35 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 staffthen your command handler broke
If you aren't getting any errors, try to place
console.log
checkpoints throughout your code to find out where execution stops.
- Once you do, log relevant values and if-conditions
- More sophisticated debugging methods are breakpoints and runtime inspections: learn moreIf no command works for me, is there any way to fix it?
Still not working
.
also #how-to-get-help
What is the console.log is it a file or is it the normal console.
You don't know what console log is?
Because I am Spanish and that's why I don't understand what the console.log thing is.
This?
You're missing a execute function
Probably in your command
But it's not just 1, it's in all commands
Do you want me to send you a sample of one of my commands?
Yeah and also send your command handler
INDEX.JS
EXP OF MY COMMAND
' + Result + '
Show your project structure
What project???
Project folder structure
And where is that (I'm a bit of a noob)
I think I found your problem
In some commands you are exporting
data
property that contains name
and other propertiesyeeeeee, let's see
But in your command handler you're setting command's name from directly
command
object which does not existAnd how to fix that?
... data: { name: '...' ...
... client.commands.set(command.name) ...
in my handlre??
property
name
does not exist on command
object
also looks like you are using both
Use oneI don't understand why I should apply that to my handler?
If you don't understand what I said then you need to brush your JS skills
#rules 3
Do I apply this to my handler???
Srry for ping
This is an example from your code
Also as I said higher you are mixing both, in some commands you are exporting
name
property that your handler uses and in some you are exporting data
object with name
propertyThat index.js is from an AI since I don't know how to do index.js
#rules 3
I don't understand that rule, I read it 40 times, I remind you that I am Spanish.
Then your bio is basically a huge lie.
about me looks familiar :meguFace:
Please brush up on your javascript knowledge, which you seem to be lacking completely.
Don't use AI to write code for you. #rules 3 #resources