const fs = require ("fs")
module.exports = async bot => {
fs.readdirSync ("./Commandes").filter(f => f.endsWith(".js")).forEach(async files => {
let command = require(../Commandes/${files})
if(command.name || typeof command.name !== "string") throw new TypeError(La commande ${files.slice(0, files.length - 3 )} n'a pas de nom ! )
bot.commands.set(command.name, command)
console.log(Commande${file} chargée avec succés !)
})
}