mirror of
https://github.com/arthur-pbty/gestion.git
synced 2026-06-07 14:55:25 +02:00
add logs set channel , event coming soon
This commit is contained in:
@@ -3,7 +3,6 @@ const sqlite3 = require('sqlite3').verbose();
|
||||
|
||||
module.exports = {
|
||||
name: 'helpall',
|
||||
aliases: ['hall', 'aideall'],
|
||||
description: 'Liste toutes les commandes disponibles par niveau de permission',
|
||||
emote: '📚',
|
||||
utilisation: 'helpall',
|
||||
@@ -30,7 +29,6 @@ module.exports = {
|
||||
|
||||
const commandsByPermission = {};
|
||||
|
||||
// Parcourir les permissions et les commandes associées
|
||||
for (const [commandName, permissionLevel] of Object.entries(permissions)) {
|
||||
if (!commandsByPermission[permissionLevel]) {
|
||||
commandsByPermission[permissionLevel] = [];
|
||||
@@ -38,7 +36,7 @@ module.exports = {
|
||||
commandsByPermission[permissionLevel].push(commandName);
|
||||
}
|
||||
|
||||
// Créer les embeds pour chaque niveau de permission avec des commandes associées
|
||||
|
||||
const embeds = Object.entries(commandsByPermission).map(([permissionLevel, commands]) => {
|
||||
const commandDescriptions = commands.map(commandName => {
|
||||
const command = client.commands.get(commandName);
|
||||
@@ -49,7 +47,7 @@ module.exports = {
|
||||
}).filter(Boolean);
|
||||
|
||||
if (commandDescriptions.length === 0) {
|
||||
return null; // Skip creating an embed if there are no commands for this permission level
|
||||
return null;
|
||||
}
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
@@ -58,7 +56,7 @@ module.exports = {
|
||||
|
||||
embed.setDescription(commandDescriptions.join('\n'));
|
||||
return embed;
|
||||
}).filter(Boolean) // Filter out any undefined embeds
|
||||
}).filter(Boolean)
|
||||
|
||||
if (embeds.length === 0) {
|
||||
return message.reply("Aucune commande disponible pour ce serveur.");
|
||||
|
||||
Reference in New Issue
Block a user