add logs set channel , event coming soon

This commit is contained in:
VALOU3336
2024-02-26 16:17:01 +01:00
parent ed8b60e322
commit 55bf300bc9
11 changed files with 340 additions and 10 deletions
+3 -5
View File
@@ -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.");