mirror of
https://github.com/arthur-pbty/gestion.git
synced 2026-06-03 23:36:35 +02:00
14 lines
579 B
JavaScript
14 lines
579 B
JavaScript
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`);
|
|
}; |