undefined error reading name
my commandhandler cant read properties of undefined it says...
36 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.show the error
Show the code
#how-to-get-help
I was getting to that
just tried snipping my code
One or more commands do not have a data property
hmm however, if i comment out one of commands called update.js the bot suddenly starts working?
Then that command does not have a data property
console.log the file it returns
sure
also i hope you do not run that code on every start?
nah
i just reload
doesnt seem to work
the code doesnt execute
what code? The console.log? It should execute if you put it before you access .name
owh you meant like that lmao
yeah
doesnt work
well now it appears that the update.js file isnt even related wtf
istg i didnt touch anything
Just check for a .data property on every file and console.log whenever a file does not have it
no need, its just like 3 commands
and they have data propery
cause /help command worked earlier
sry im bad at debugging
according to your error one or more files dont have it
you meant like that?
yep, but also add which file
i did , __filename
but it says that its commandhandler.js
doesnt have it
well then that file does not have ot
why would it need it xd
this is super weird
why do you read from it
for this
the events code works
yes but why is your command handlzr in the same directory as your commands
its not
or wdym
whats wrong with this whole code
wth???!
whatever ima rewrite it
thanks
will anyone help me