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 toolkit12mo 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
Dhymbot12mo ago
if you don't know what i actually mean tag me and i explain the problem more at detail
Dhymbot
Dhymbot12mo 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
Dhymbot12mo ago
oh ok
sexy dark chocolate
You can explain to me though
d4
d412mo ago
seems like you're looking to make an event handler @dhymbot
Dhymbot
Dhymbot12mo ago
i want this event doing something but outside from the index.js
Dhymbot
Dhymbot12mo ago
i think i already have one
d.js docs
d.js docs12mo ago
guide Creating Your Bot: Event handling read more
Dhymbot
Dhymbot12mo ago
im going to watch it thnx