diff --git a/commands/help.js b/commands/help.js index fadbed4..e37857e 100644 --- a/commands/help.js +++ b/commands/help.js @@ -6,6 +6,26 @@ module.exports = { emote: '📚', utilisation: '', async execute(message, args, client) { + if (args[0]) { + // L'utilisateur a fourni un argument, affichez l'aide pour cette commande + const command = client.commands.get(args[0]); + if (!command) { + return message.reply(`Je n'ai pas trouvé de commande nommée "${args[0]}".`); + } + + const embed_command = new EmbedBuilder() + .setColor('#0099ff') + .setTitle(`Aide pour la commande ${command.emote ? ` ${command.emote}` : '🔧'} ${command.name}`) + .setDescription(command.description) + .addFields( + { name: 'Utilisation', value: `\`+${command.name}${command.utilisation ? ` ${command.utilisation}` : ''}\``, inline: true }, + { name: 'Catégorie', value: command.category || 'Non spécifiée', inline: true } + ); + + return message.reply({ embeds: [embed_command] }); + } + + const categories = { antiraid: [], botcontrol: [],