TypeError Cannot read properties of undefined (reading 'toJSON')
TypeError: Cannot read properties of undefined (reading 'toJSON')
at Object.<anonymous> (C:\Users\luizs\Documents\Bot\deploy-commands.js:12:29)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Module._load (node:internal/modules/cjs/loader:878:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47
13 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
One of your command files is missing its data property with a slash command builder
would u tell me what do i need to do ? been struggling with these since 1pm
The error will be in one of the files in your /commands directory
but its saying its in the deploying-commands.js
You're accessing the property command.data (which is undefined) in that file
command is defined as a separate file, and you should find that
if i send u a print maybe u could identify it for me ? im new at programing
@squiddleton
We expect you to have a solid grasp of JS fundamentals, re: #rules 2
pls bro tell me , its been more than 7 hours im trying to do only this command
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Because you can't directly send a builder instance to the API
They're using the handler from the guide
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
im still learning js , so i cant understand that much
and @migtibincoski , if u want to talk in the private about it , im also brazilian , id aprecciate if u could help me