Replies: 2 comments
-
well im using this in my index.js |
Beta Was this translation helpful? Give feedback.
-
So I would replace what I posted below here that what you used? const commandFiles = readdirSync(join(__dirname, "commands")).filter((file) => file.endsWith(".js")); |
Beta Was this translation helpful? Give feedback.
-
Is it possible to have more then one commandFile if you wish to integrate more features into the bot and you don't want to cram it all in one folder. For example I wish to find source code so I can also add moderation commands and I do not want to be restricted to just one file for everything.
const commandFiles = readdirSync(join(__dirname, "misc" )).filter((file) => file.endsWith(".js"));
^
SyntaxError: Identifier 'commandFiles' has already been declared
Beta Was this translation helpful? Give feedback.
All reactions