upgrade help commande

This commit is contained in:
Tutur33
2024-02-15 02:42:28 +01:00
parent 3e7020cd00
commit 07ec599d26
+20
View File
@@ -6,6 +6,26 @@ module.exports = {
emote: '📚',
utilisation: '<commande>',
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: [],