mirror of
https://github.com/arthur-pbty/gestion.git
synced 2026-06-10 19:04:21 +02:00
loader add
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
module.exports = async (client) => {
|
||||
const prefixCommandsPath = path.join(__dirname, '../commandprefix'); // Ajustez le chemin ici
|
||||
const commandFiles = fs.readdirSync(prefixCommandsPath).filter(file => file.endsWith('.js'));
|
||||
|
||||
for (const file of commandFiles) {
|
||||
const command = require(`../commandprefix/${file}`); // Ajustez le chemin ici
|
||||
client.prefixCommands.set(command.name, command);
|
||||
}
|
||||
|
||||
console.log(`[Prefix Commands] => ${client.prefixCommands.size} prefix commands loaded`);
|
||||
};
|
||||
Reference in New Issue
Block a user