mirror of
https://github.com/arthur-pbty/gestion.git
synced 2026-06-20 05:42:01 +02:00
upgrade help commande
This commit is contained in:
@@ -6,6 +6,26 @@ module.exports = {
|
|||||||
emote: '📚',
|
emote: '📚',
|
||||||
utilisation: '<commande>',
|
utilisation: '<commande>',
|
||||||
async execute(message, args, client) {
|
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 = {
|
const categories = {
|
||||||
antiraid: [],
|
antiraid: [],
|
||||||
botcontrol: [],
|
botcontrol: [],
|
||||||
|
|||||||
Reference in New Issue
Block a user