Code structure question
Hello, maybe that's an stupid question, but I never did use it. I try to handle my code way better then only an "index.js", so I decided to split the code into more "~.js"-s. So my question is: can I do more then one file with "ready" or "interactionCreate"?
6 Replies
• 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.So like I do an folder named "events" into this folder I put multiple files like: "poll.js", "register.js" ... etc. I hope you understand me and my little issue.
you can, but you generally dont want to duplicate your events
Rather you'd want one
interactionCreate.js
event file handling and routing to multiple command filesI think this part of the guide gets into file splitting
hm okay make sence
Yes it is, but my question pointed at another way :D