Im a bit new to js coding, so idk how to call functions at index

So, i want to make at different files (for not having all the coding on the index.js) the line of commands like "client.on()" and saving them on a folder, is there any way to make it?
12 Replies
d.js toolkit
d.js toolkit2y ago
• 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.
Dhymbot
DhymbotOP2y ago
if you don't know what i actually mean tag me and i explain the problem more at detail
Dhymbot
DhymbotOP2y ago
its on the top
sexy dark chocolate
You'd like to call a function from one file in the index? I'm on mobile I'd have to download the file
Dhymbot
DhymbotOP2y ago
oh ok
sexy dark chocolate
You can explain to me though
d4
d42y ago
seems like you're looking to make an event handler @dhymbot
Dhymbot
DhymbotOP2y ago
i want this event doing something but outside from the index.js
Dhymbot
DhymbotOP2y ago
i think i already have one
d.js docs
d.js docs2y ago
guide Creating Your Bot: Event handling read more
Dhymbot
DhymbotOP2y ago
im going to watch it thnx
Want results from more Discord servers?
Add your server