Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js'));
- for (const file of commandFiles) {
- const command = require(`./commands/${file}`);
- client.commands.set(command.name, command);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement