I have an error in my code that I don't understand.
Good evening, I have an error in my code that I don't understand. I have already tried several times to modify my code but I still can't do it. What I'm trying to do is that when the user fills out the options the bot responds to the command with a message that contains what the user wrote. Thanks in advance.
here is the code for the command :
in the terminal the error speaks of the LoadCommands code so I put it there too:
})
}
here is the code for the command :
in the terminal the error speaks of the LoadCommands code so I put it there too:
``const fs = require("fs")
module.exports = async bot => {
fs.readdirSync("./Commandes").filter(f => f.endsWith(".js")).forEach(async file => {
let command = require(../Commandes/${file})
if(!command.name || typeof command.name !== "string") throw new TypeError(La commande ${file.slice(0, file.length - 3)} n'a pas de nom !)
bot.commands.set(command.name, command)
console.log(Commande ${file} chargée avec succés !`)})
}

