#Extreme could perhaps be a nice person

1 messages · Page 1 of 1 (latest)

slim zephyr
#
                                   ^

TypeError: Cannot read properties of undefined (reading 'toJSON')``` why does this happen. and what are steps I need to take to prevent it from happening
hexed crater
#

Okay show me your file structure

slim zephyr
#

oki

#
                                   ^

TypeError: Cannot read properties of undefined (reading 'toJSON')``` I solved issue with bot not being able to go online. It's just this one.
hexed crater
#

Okay so

slim zephyr
#

thonk

hexed crater
#

@slim zephyr

slim zephyr
#

ik ty

hexed crater
#

What does it log

slim zephyr
#

this is how you want it correct?

hexed crater
#

What does it log in the console

#

Yes

slim zephyr
#
                   ^

ReferenceError: commandFiles is not defined```
hexed crater
#

Why did you remove commandFiles

#

const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js')); is what you had

slim zephyr
#

mhm

#

i added it

hexed crater
#

Okay

gray hinge
slim zephyr
hexed crater
#

Now what does the console reply with

slim zephyr
#

well

gray hinge
hexed crater
#

go to your info command and check how it is setup

slim zephyr
#

info command?

hexed crater
#

Go to your command file then info.js

gray hinge
hexed crater
gray hinge
#

that already not djs module problem

#

from the question to now

hexed crater
#

Was originally about his command handler from djs being incorrect now idek

gray hinge
slim zephyr
#

ok

#

there

#

i removed info.js i shouldnt even have that file

hexed crater
#

👍

#

That'll fix your issue

slim zephyr
#

ty

hexed crater
#

If you have further questions not related to djs ask in one of the #useful-servers please instead

slim zephyr
#

the weird thing is, i dont ever recall adding that...

slim zephyr
#

shush

hexed crater
#

No

#

He's right

gray hinge
#

this already not djs problem

slim zephyr
#

go back to being non-existence

hexed crater
#

This isn't even djs anymore

slim zephyr
#

ik

hexed crater
#

And it's getting out of hand

#

This is a basic js issue that shouldn't require any help

slim zephyr
#

im sleepy ok

gray hinge
hexed crater
#

I explained it as best as I could and you still needed me to do more

#

Then get some sleep

slim zephyr
#

never