Need help setting up d.js

I am at "loading file commands" and dont understand how to add the code to the current index.js file. I tried using ChatGPT, but it didnt work.
15 Replies
d.js toolkit
d.js toolkit8mo ago
- 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!
treble/luna
treble/luna8mo ago
* Show your code also dont ever use ai, its only gonna make things worse
Skull
SkullOP8mo ago
Okay. let me screenshot the codes
treble/luna
treble/luna8mo ago
no
d.js docs
d.js docs8mo ago
To share long code snippets, use a service like gist, sourcebin, pastebin, or similar instead of posting them as large code blocks or files.
Skull
SkullOP8mo ago
SourceBin
My code
This is the code i have from first making the file. (index.js)
treble/luna
treble/luna8mo ago
okay, and whats your issue because no where in that code do i see anything that can even cause the issue you described
Skull
SkullOP8mo ago
I dont understand how to add https://srcb.in/ANPnMWg6S3 this code, to it.
SourceBin
The code it wants me to add
Instantly share your code with the world.
Skull
SkullOP8mo ago
as im told in the docs to do
treble/luna
treble/luna8mo ago
you just add it to your index literally just add the client.commands = ... do you have any javascript experience
Skull
SkullOP8mo ago
not much
treble/luna
treble/luna8mo ago
then i would recommend checking out #resources first, djs isnt for beginners and you are required to have a solid understanding of javascript, as per #rules 3
Skull
SkullOP8mo ago
so id add client.commands = https://srcb.in/ANPnMWg6S3 <- this code?
SourceBin
The code it wants me to add
Instantly share your code with the world.
treble/luna
treble/luna8mo ago
yes
Skull
SkullOP8mo ago
okay. Ty ill try to learn too. im sorry for not learning before.

Did you find this page helpful?