I'm always coding in only one file that called index.js like main scripting file. So, i seen people splitting the code to different files. For example, music bot. It has commands play, pause, loop etc, how i can split it to different files and connect it to index.js?
Asked
Active
Viewed 23 times
0
-
Have you checked [Node documentation](https://nodejs.org/api/modules.html) on that - and if so, are there any specific questions? – raina77ow Feb 20 '21 at 22:54
-
Look up ES6 imports and common JS require (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import, https://nodejs.org/en/knowledge/getting-started/what-is-require/) – Nick Feb 20 '21 at 22:55