module.exports = async (client, message) => { const path = require(`path`); const discord = require(`discord.js`); const functions = require(path.join(`../..`, `functions.js`)); const args = await message.content.slice(functions.ENVFORMATVALUE(process.env.PREFIX).length).trim().split(/ +/g); const commandName = args.shift().toLowerCase(); const command = client.commands.get(commandName) || client.commands.get(client.aliases.get(commandName)); if (message.author.bot || message.content.indexOf(functions.ENVFORMATVALUE(process.env.PREFIX)) !== 0 || !command) return; if (command.args == true && !args.length) return message.reply(command.usage ? `Vous n'avez fourni aucun argument !\nL'utilisation appropriée serait: \`${functions.ENVFORMATVALUE(process.env.PREFIX)}${command.name} ${command.usage}\`` : `Vous n'avez fourni aucun argument !`); if (command.guildOnly == true && message.channel.type != `text`) return message.reply(`Cette commande peut-être utilisé que dans un serveur !`); return await command.execute(client, message, args, discord, functions); };