diff --git a/commands/botcontrol/invite.js b/commands/botcontrol/invite.js index ccf0293..48a7e99 100644 --- a/commands/botcontrol/invite.js +++ b/commands/botcontrol/invite.js @@ -2,6 +2,7 @@ const { PermissionsBitField } = require('discord.js'); module.exports = { name: 'invite', + aliases: ['inv'], description: 'Crée un lien d\'invitation pour un serveur spécifique', emote: '🔗', utilisation: 'invite [guildId]', diff --git a/commands/botcontrol/leave.js b/commands/botcontrol/leave.js index 3ae6341..63b5eb0 100644 --- a/commands/botcontrol/leave.js +++ b/commands/botcontrol/leave.js @@ -3,6 +3,7 @@ const path = require('path'); module.exports = { name: 'leave', + aliases: ['leaveguild'], description: "Faire quitter le bot un serveur", emote: '🚪', utilisation: 'leave [guildId]', diff --git a/commands/botcontrol/listen.js b/commands/botcontrol/listen.js index fbf7d7a..8de3986 100644 --- a/commands/botcontrol/listen.js +++ b/commands/botcontrol/listen.js @@ -2,6 +2,7 @@ const { ActivityType } = require("discord.js"); module.exports = { name: 'listen', + aliases: ['écoute'], description: 'Changer le status du bot en listen', emote: '🎧', utilisation: 'listen ', diff --git a/commands/botcontrol/play.js b/commands/botcontrol/play.js index 38e13e0..1befb47 100644 --- a/commands/botcontrol/play.js +++ b/commands/botcontrol/play.js @@ -2,6 +2,7 @@ const { ActivityType } = require("discord.js"); module.exports = { name: 'play', + aliases: ['joue'], description: 'Changer le status du bot en play', emote: '🎵', utilisation: 'play ', diff --git a/commands/botcontrol/say.js b/commands/botcontrol/say.js index f82c38a..113ba18 100644 --- a/commands/botcontrol/say.js +++ b/commands/botcontrol/say.js @@ -1,5 +1,6 @@ module.exports = { name: 'say', + aliases: ['dire'], description: 'Fait dire quelque chose au bot', emote: '💬', utilisation: 'say ', diff --git a/commands/botcontrol/servers.js b/commands/botcontrol/servers.js index 474b77d..a370260 100644 --- a/commands/botcontrol/servers.js +++ b/commands/botcontrol/servers.js @@ -4,6 +4,7 @@ const path = require('path'); module.exports = { name: 'servers', + aliases: ['serveurs'], description: 'Liste les serveur du bot', emote: '🌐', utilisation: 'servers', diff --git a/commands/botcontrol/set.js b/commands/botcontrol/set.js index daf5494..25a32f1 100644 --- a/commands/botcontrol/set.js +++ b/commands/botcontrol/set.js @@ -1,9 +1,11 @@ module.exports = { name: 'set', + aliases: ['changer'], description: 'Modifier divers paramètres du bot.', emote: '⚙️', utilisation: 'set ', category: 'botcontrol', + async execute(message, args, client) { // Vérifiez si l'utilisateur a fourni suffisamment d'arguments if (args.length < 2) { diff --git a/commands/botcontrol/stream.js b/commands/botcontrol/stream.js index ea32d50..12b3196 100644 --- a/commands/botcontrol/stream.js +++ b/commands/botcontrol/stream.js @@ -2,6 +2,7 @@ const { ActivityType } = require("discord.js"); module.exports = { name: 'stream', + aliases: ['streaming'], description: 'Mettre le bot en stream', emote: '🎥', utilisation: 'stream ', diff --git a/commands/botcontrol/watch.js b/commands/botcontrol/watch.js index 17d9ca1..03de7ea 100644 --- a/commands/botcontrol/watch.js +++ b/commands/botcontrol/watch.js @@ -2,6 +2,7 @@ const { ActivityType } = require("discord.js"); module.exports = { name: 'watch', + aliases: ['regarde'], description: 'Changer le status du bot en watch', emote: '👁️', utilisation: 'watch ', diff --git a/commands/game/8ball.js b/commands/game/8ball.js index 33ddcee..5b300fb 100644 --- a/commands/game/8ball.js +++ b/commands/game/8ball.js @@ -1,9 +1,11 @@ module.exports = { name: '8ball', + aliases: ['eightball', '8b'], description: 'Posez une question à la boule magique 8', emote: '🔮', utilisation: '8ball ', category: 'game', + execute(message, args) { if (!args[0]) { return message.reply("Veuillez poser une question."); diff --git a/commands/game/catsay.js b/commands/game/catsay.js index 80201e0..cc2fb8b 100644 --- a/commands/game/catsay.js +++ b/commands/game/catsay.js @@ -1,5 +1,6 @@ module.exports = { name: 'catsay', + aliases: ['chatdire'], description: 'Faire parler les chat', emote: '🐱', utilisation: 'catsay ', diff --git a/commands/game/fasttype.js b/commands/game/fasttype.js index 3e3ce1b..614cebc 100644 --- a/commands/game/fasttype.js +++ b/commands/game/fasttype.js @@ -28,10 +28,12 @@ const sentences = [ module.exports = { name: 'fasttype', + aliases: ['typefast'], description: 'Jouer à un jeu de vitesse de frappe', emote: '⌨️', utilisation: 'fasttype', category: 'game', + async execute(message, args) { const randomSentence = sentences[Math.floor(Math.random() * sentences.length)]; diff --git a/commands/game/findemoji.js b/commands/game/findemoji.js index 7fb0acb..b64afe5 100644 --- a/commands/game/findemoji.js +++ b/commands/game/findemoji.js @@ -2,6 +2,7 @@ const { FindEmoji } = require('discord-gamecord'); module.exports = { name: 'findemoji', + aliases: ['trouveremoji'], description: 'Jouer au jeu Trouver Emoji', emote: '🔍', utilisation: 'findemoji', diff --git a/commands/game/flood.js b/commands/game/flood.js index f0096a8..14ab053 100644 --- a/commands/game/flood.js +++ b/commands/game/flood.js @@ -2,10 +2,12 @@ const { Flood } = require('discord-gamecord'); module.exports = { name: 'flood', + aliases: ['inondation'], description: 'Jouer au jeu Flood', emote: '🌊', utilisation: 'flood', category: 'game', + async execute(message, args) { const Game = new Flood({ message: message, diff --git a/commands/game/guessThePokemon.js b/commands/game/guessThePokemon.js index fef8f81..97d962e 100644 --- a/commands/game/guessThePokemon.js +++ b/commands/game/guessThePokemon.js @@ -2,10 +2,12 @@ const { GuessThePokemon } = require('discord-gamecord'); module.exports = { name: 'guesspokemon', + aliases: ['guesspok', 'guesspoke', 'gp', 'devinepokemon', 'devinepok', 'devinepoke'], description: 'Jouer au jeu trouver le pokemon', emote: '🐼', utilisation: 'guesspokemon', category: 'game', + async execute(message, args) { const Game = new GuessThePokemon({ message: message, diff --git a/commands/game/morpion.js b/commands/game/morpion.js index ad275e0..7b12091 100644 --- a/commands/game/morpion.js +++ b/commands/game/morpion.js @@ -2,10 +2,12 @@ const { TicTacToe } = require('discord-gamecord'); module.exports = { name: 'morpion', + aliases: ['morp'], description: 'Jouer à morpion', emote: '⭕', utilisation: 'morpion', category: 'game', + async execute(message, args) { if (!message.mentions.members.first()) return message.reply("Veuillez mentionner un adversaire"); diff --git a/commands/game/pendu.js b/commands/game/pendu.js index 8b05173..ea8ba31 100644 --- a/commands/game/pendu.js +++ b/commands/game/pendu.js @@ -1,4 +1,5 @@ const { Hangman } = require('discord-gamecord'); + const words = [ 'pomme', 'banane', 'cerise', 'poire', 'figue', 'raisin', 'orange', 'melon', 'fraise', 'abricot', 'prune', 'coing', @@ -25,6 +26,7 @@ const words = [ 'feu', 'balance', 'batterie', 'caleçon', 'collant', 'contenance', 'gencive', 'jean', 'jogging', 'pince', 'pantalon', 'pince', 'pince', 'pince', 'pince', 'pince', 'pyjama', 'short', 'slip', 'soup', 'vaisselle' ]; + module.exports = { name: 'pendu', description: 'Jouer à pendu', diff --git a/commands/game/pfc.js b/commands/game/pfc.js index 8c5ae33..c6ae38c 100644 --- a/commands/game/pfc.js +++ b/commands/game/pfc.js @@ -2,10 +2,12 @@ const choices = ["pierre", "papier", "ciseaux"]; module.exports = { name: 'pfc', + aliases: ['pierre-papier-ciseaux', 'shifumi', 'pierrepapierciseaux', 'rockpaperscissors', 'rock-paper-scissors'], description: 'Jouer à pierre-papier-ciseaux', emote: '✊', utilisation: 'pfc', category: 'game', + async execute(message, args) { const userChoice = args[0]; const botChoice = choices[Math.floor(Math.random() * choices.length)]; diff --git a/commands/game/puissance4.js b/commands/game/puissance4.js index cb4036f..17cf4b1 100644 --- a/commands/game/puissance4.js +++ b/commands/game/puissance4.js @@ -6,6 +6,7 @@ module.exports = { description: 'Lancer une partie de puissance4', emote: '🔴', category: 'game', + async execute(message) { if (!message.mentions || !message.mentions.members.first()) diff --git a/commands/game/slot.js b/commands/game/slot.js index ed6304f..b57024b 100644 --- a/commands/game/slot.js +++ b/commands/game/slot.js @@ -2,10 +2,12 @@ const { Slots } = require('discord-gamecord'); module.exports = { name: 'slot', + aliases: ['slotmachine'], description: 'Jouer au jeu Slot', emote: '🎰', utilisation: 'slot', category: 'game', + async execute(message, args) { const Game = new Slots({ message: message, diff --git a/commands/game/snake.js b/commands/game/snake.js index de98960..eca18f3 100644 --- a/commands/game/snake.js +++ b/commands/game/snake.js @@ -2,6 +2,7 @@ const { Snake } = require("discord-gamecord") const color = '#0099ff'; // Définit module.exports = { name: 'snake', + aliases: ['serpent', 'snakegame'], utilisation: 'snake', description: 'Lancer une partie de snake', emote: '🐍', diff --git a/commands/game/wordle.js b/commands/game/wordle.js index ca94424..cec4ec4 100644 --- a/commands/game/wordle.js +++ b/commands/game/wordle.js @@ -1,4 +1,5 @@ const { Wordle } = require('discord-gamecord'); + const words = [ 'pomme', 'banane', 'cerise', 'poire', 'figue', 'raisin', 'orange', 'em', 'fraise', 'abricot', 'prune', 'coing', diff --git a/commands/gestion/change.js b/commands/gestion/change.js index 35fe32c..845e7aa 100644 --- a/commands/gestion/change.js +++ b/commands/gestion/change.js @@ -4,6 +4,7 @@ const db = require('quick.db'); const GestionDb = new db.table("gestion"); module.exports = { name: 'change', + aliases: ['permchange'], description: 'Change le niveau de permission d\'une commande', emote: '🔄', utilisation: 'change ', diff --git a/commands/gestion/clear.js b/commands/gestion/clear.js index 4ce686b..0aaef74 100644 --- a/commands/gestion/clear.js +++ b/commands/gestion/clear.js @@ -1,6 +1,7 @@ const { PermissionsBitField} = require("discord.js") module.exports = { name: 'clear', + aliases: ['purge', 'delete', 'suppr', 'efface', 'nettoie', 'vide', 'clean', 'effacer'], description: 'Clear des messages', emote: '🗑️', utilisation: 'clear ', diff --git a/commands/gestion/create.js b/commands/gestion/create.js index 4a044db..a5d5f15 100644 --- a/commands/gestion/create.js +++ b/commands/gestion/create.js @@ -2,8 +2,10 @@ const axios = require('axios'); module.exports = { name: 'create', + aliases: ['createemoji', 'create-emoji', 'create-emojis', 'emoji-create', 'emojicreate'], description: 'Crée un emoji', category: 'gestion', + async execute(message, args, client) { if (!args.length) { return message.channel.send({ content: "Veuillez spécifier un émoji." }); diff --git a/commands/gestion/dm.js b/commands/gestion/dm.js index 856f364..6b8b065 100644 --- a/commands/gestion/dm.js +++ b/commands/gestion/dm.js @@ -1,5 +1,6 @@ module.exports = { name: 'dm', + aliases: ['mp'], description: 'Envoie un message privé à un utilisateur', emote: '📧', utilisation: 'dm <@utilisateur> ', diff --git a/commands/gestion/embed.js b/commands/gestion/embed.js index 2e3e98d..42c0e6d 100644 --- a/commands/gestion/embed.js +++ b/commands/gestion/embed.js @@ -1,10 +1,13 @@ const { EmbedBuilder, ActionRowBuilder, StringSelectMenuBuilder } = require('discord.js'); - module.exports = { name: 'embed', + aliases: ['embedcreate', 'createembed'], description: 'Crée un embed customisable', + emote: '📝', + utilisation: 'embed', category: 'gestion', + async execute(message, args, client) { const embed = new EmbedBuilder(); diff --git a/commands/gestion/greet.js b/commands/gestion/greet.js index 9ecedba..3ad3cf0 100644 --- a/commands/gestion/greet.js +++ b/commands/gestion/greet.js @@ -5,6 +5,10 @@ const GestionDb = new db.table('gestion'); module.exports = { name: 'greet', description: 'Ajoute ou supprime un salon des greet', + emote: '👋', + utilisation: 'greet ', + category: 'gestion', + async execute(message, args) { const botId = message.client.user.id; const guildId = message.guild.id; diff --git a/commands/gestion/greetlist.js b/commands/gestion/greetlist.js index 2868aa9..59d5359 100644 --- a/commands/gestion/greetlist.js +++ b/commands/gestion/greetlist.js @@ -4,7 +4,12 @@ const GestionDb = new db.table('gestion'); module.exports = { name: 'greetlist', + aliases: ['greetliste'], description: 'Affiche la liste des salons avec un salutation', + emote: '👋', + utilisation: 'greetlist', + category: 'gestion', + async execute(message) { const botId = message.client.user.id; const guildId = message.guild.id; diff --git a/commands/gestion/massiverole.js b/commands/gestion/massiverole.js index d72a876..7cb9acd 100644 --- a/commands/gestion/massiverole.js +++ b/commands/gestion/massiverole.js @@ -2,6 +2,7 @@ const { EmbedBuilder, ActionRowBuilder, StringSelectMenuBuilder } = require('dis module.exports = { name: 'massiverole', + aliases: ['massrole'], description: 'Donne un rôle à tous les membres du serveur', emote: '👥', utilisation: 'massiverole <@role>', diff --git a/commands/gestion/perm.js b/commands/gestion/perm.js index ab2e2a6..c2cd0a6 100644 --- a/commands/gestion/perm.js +++ b/commands/gestion/perm.js @@ -1,12 +1,15 @@ const db = require('quick.db'); const GestionDb = new db.table("gestion"); const { EmbedBuilder } = require('discord.js'); + module.exports = { name: 'perm', + aliases: ['permissions', 'permissionslist', 'permis', 'perms', 'permlist', 'permliste', 'perml'], description: 'Affiche les rôles pour chaque niveau de permission et commande', emote: '🛡️', utilisation: 'perm', category: 'gestion', + async execute(message, client) { const botId = message.client.user.id; const embed = new EmbedBuilder() diff --git a/commands/gestion/poll.js b/commands/gestion/poll.js index ad644ad..97fd843 100644 --- a/commands/gestion/poll.js +++ b/commands/gestion/poll.js @@ -2,10 +2,12 @@ const { EmbedBuilder, StringSelectMenuBuilder, ActionRowBuilder, ButtonBuilder, module.exports = { name: 'poll', + aliases: ['sondage'], description: 'Crée un sondage', emote: '📊', utilisation: 'poll', category: 'gestion', + async execute(message, args, client) { const pollEmbed = new EmbedBuilder() .setTitle('Sondage') diff --git a/commands/gestion/prefix.js b/commands/gestion/prefix.js index 0218cc2..9467530 100644 --- a/commands/gestion/prefix.js +++ b/commands/gestion/prefix.js @@ -3,10 +3,12 @@ const GestionDb = new db.table("gestion"); module.exports = { name: 'prefix', + aliases: ['setprefix'], description: 'Change le préfixe du bot ', emote: '🔧', utilisation: 'prefix ', category: 'botcontrol', + async execute(message, args, client) { const botId = client.user.id; const guildId = message.guild.id; diff --git a/commands/gestion/renew.js b/commands/gestion/renew.js index 81e2b27..869b9b5 100644 --- a/commands/gestion/renew.js +++ b/commands/gestion/renew.js @@ -1,10 +1,12 @@ const { PermissionsBitField} = require("discord.js") module.exports = { name: 'renew', + aliases: ['renouveler'], description: 'Renew un salon', emote: '🔄', utilisation: 'renew', category: 'gestion', + async execute(message, args, client) { const guild = message.guild; const channel = message.mentions.channels.first() || message.channel; diff --git a/commands/gestion/setperm.js b/commands/gestion/setperm.js index 5f4c5ca..d46d711 100644 --- a/commands/gestion/setperm.js +++ b/commands/gestion/setperm.js @@ -6,6 +6,7 @@ module.exports = { emote: '🔑', utilisation: 'setperm @role', category: 'gestion', + async execute(message, args, client) { const botId = message.client.user.id; const permissionOrCommand = args[0].toLowerCase(); diff --git a/commands/gestion/unmassiverole.js b/commands/gestion/unmassiverole.js index 03f4fa7..059d22d 100644 --- a/commands/gestion/unmassiverole.js +++ b/commands/gestion/unmassiverole.js @@ -2,10 +2,12 @@ const { EmbedBuilder, ActionRowBuilder, StringSelectMenuBuilder } = require('dis module.exports = { name: 'unmassiverole', + aliases: ['unmassrole'], description: 'Retire un rôle à tous les membres du serveur', emote: '👥', utilisation: 'unmassiverole <@role>', category: 'gestion', + async execute(message, args, client) { // Vérifie si un rôle a été mentionné const role = message.mentions.roles.first(); diff --git a/commands/moderation/kick.js b/commands/moderation/kick.js index 1ee0d58..79874d6 100644 --- a/commands/moderation/kick.js +++ b/commands/moderation/kick.js @@ -3,6 +3,7 @@ const { getPermissionLevel } = require('../fonction'); module.exports = { name: 'kick', + aliases: ['expulse'], description: 'Kick a member', emote: '🔍', utilisation: 'kick <@member> [reason]', diff --git a/commands/owner/bl.js b/commands/owner/bl.js index b3cad7e..c9a62ba 100644 --- a/commands/owner/bl.js +++ b/commands/owner/bl.js @@ -4,10 +4,12 @@ const { EmbedBuilder } = require('discord.js'); module.exports = { name: 'bl', + aliases: ['blacklist', 'blacklistlist', 'bliste'], description: 'AJouter ou affiché la list des blacklist', emote: '🚫', utilisation: 'bl [@user]', category: 'gestion', + async execute(message, args, client) { const user = message.mentions.users.first() || (args[0] && client.users.cache.get(args[0])); const botId = message.client.user.id; diff --git a/commands/owner/clearowner.js b/commands/owner/clearowner.js index 9713e29..b29d3f4 100644 --- a/commands/owner/clearowner.js +++ b/commands/owner/clearowner.js @@ -4,10 +4,12 @@ const GestionDb = new db.table("gestion"); module.exports = { name: 'clearowner', + aliases: ['clearowners'], description: 'Supprimer tout les owners', emote: '👑', utilisation: 'clearowner', category: 'buyer', + async execute(message, args, client) { const botId = client.user.id; GestionDb.set(`${botId}.owners`, {}); diff --git a/commands/owner/clearwl.js b/commands/owner/clearwl.js index c4c5953..65765bc 100644 --- a/commands/owner/clearwl.js +++ b/commands/owner/clearwl.js @@ -4,7 +4,12 @@ const GestionDb = new db.table("gestion"); module.exports = { name: 'clearwl', + aliases: ['clearwhitelist'], description: 'Supprimer tout la whitelist', + emote: '👑', + utilisation: 'clearwl', + category: 'buyer', + async execute(message, args, client) { const botId = message.client.user.id; const guildId = message.guild.id; diff --git a/commands/owner/owner.js b/commands/owner/owner.js index 7e10357..eb91b0d 100644 --- a/commands/owner/owner.js +++ b/commands/owner/owner.js @@ -4,10 +4,12 @@ const { EmbedBuilder } = require('discord.js'); module.exports = { name: 'owner', + aliases: ['owners'], description: 'Affiche la liste des propriétaires ou ajoute un propriétaire', emote: '👑', utilisation: 'owner <@user>', category: 'buyer', + async execute(message, client) { const user = message.mentions.users.first(); const botId = message.client.user.id; diff --git a/commands/owner/unbl.js b/commands/owner/unbl.js index 47afa8b..c533d80 100644 --- a/commands/owner/unbl.js +++ b/commands/owner/unbl.js @@ -4,10 +4,12 @@ const { EmbedBuilder } = require('discord.js'); module.exports = { name: 'unbl', - description: 'ENlevé une personne de la blacklist', + aliases: ['unblacklist'], + description: 'Enlever une personne de la blacklist', emote: '🚫', utilisation: 'unbl <@user>', category: 'gestion', + async execute(message, args, client) { const user = message.mentions.users.first() || (args[0] && client.users.cache.get(args[0])); const botId = message.client.user.id; diff --git a/commands/owner/unowner.js b/commands/owner/unowner.js index 4148e80..a76600d 100644 --- a/commands/owner/unowner.js +++ b/commands/owner/unowner.js @@ -3,10 +3,12 @@ const GestionDb = new db.table("gestion"); module.exports = { name: 'unowner', + aliases: ['unowners'], description: 'Supprime un propriétaire', emote: '👑', utilisation: 'unowner <@user>', category: 'buyer', + async execute(message) { const botId = message.client.user.id; const user = message.mentions.users.first(); diff --git a/commands/owner/unwl.js b/commands/owner/unwl.js index edecf8b..082969c 100644 --- a/commands/owner/unwl.js +++ b/commands/owner/unwl.js @@ -3,7 +3,12 @@ const GestionDb = new db.table("gestion"); module.exports = { name: 'unwl', + aliases: ['unwhitelist'], description: 'Retirer un utilisateur de la liste blanche', + emote: '🚫', + utilisation: 'unwl <@user>', + category: 'gestion', + async execute(message, args) { const botId = message.client.user.id; const guildId = message.guild.id; diff --git a/commands/owner/wl.js b/commands/owner/wl.js index 8e63b6a..792d67f 100644 --- a/commands/owner/wl.js +++ b/commands/owner/wl.js @@ -4,7 +4,12 @@ const GestionDb = new db.table("gestion"); module.exports = { name: 'wl', + aliases: ['whitelist'], description: 'Ajouter un utilisateur à la liste blanche ou afficher la liste blanche', + emote: '👑', + utilisation: 'wl <@user>', + category: 'gestion', + async execute(message, args, client) { const botId = message.client.user.id; const guildId = message.guild.id; diff --git a/commands/permupdate.js b/commands/permupdate.js index e436196..08bc2b2 100644 --- a/commands/permupdate.js +++ b/commands/permupdate.js @@ -6,6 +6,10 @@ const GestionDb = new db.table("gestion"); module.exports = { name: 'permupdate', description: 'Mettre à jour les permissions dans le fichier permissions.json', + emote: '🔒', + utilisation: 'permupdate', + category: 'buyer', + async execute(message, args, client) { const commands = Array.from(client.commands.keys()); const permissionsPath = path.resolve(__dirname, '../permissions.json'); diff --git a/commands/utils/addbtnurl.js b/commands/utils/addbtnurl.js index 6f64719..5030570 100644 --- a/commands/utils/addbtnurl.js +++ b/commands/utils/addbtnurl.js @@ -2,6 +2,7 @@ const { EmbedBuilder, ButtonStyle, ButtonBuilder, ActionRowBuilder } = require(" module.exports = { name: 'addbtnurl', + aliases: ['addbuttonurl', 'addurlbtn', 'addurlbutton'], description: 'Ajoute un bouton url', emote: '🔗', utilisation: 'addbtnurl [url] [message ID] [label]', diff --git a/commands/utils/allbot.js b/commands/utils/allbot.js index b8a9d86..089684b 100644 --- a/commands/utils/allbot.js +++ b/commands/utils/allbot.js @@ -2,10 +2,12 @@ const { EmbedBuilder } = require('discord.js'); module.exports = { name: 'allbot', + aliases: ['allbots'], description: 'Affiche tous les bots sur le serveur', category: 'gestion', emote: '🤖', - utilisation: 'allbot', + utilisation: 'allbot', + async execute(message) { // Récupère tous les membres du serveur qui sont des bots const bots = message.guild.members.cache.filter(member => member.user.bot); diff --git a/commands/utils/alldmin.js b/commands/utils/alldmin.js index 414c6d8..9582574 100644 --- a/commands/utils/alldmin.js +++ b/commands/utils/alldmin.js @@ -2,10 +2,12 @@ const { EmbedBuilder, PermissionsBitField } = require('discord.js'); module.exports = { name: 'alladmin', + aliases: ['alladmins'], description: 'Affiche tous les membres avec la permission d\'administrateur sur le serveur', category: 'gestion', emote: '🔧', utilisation: 'alladmin', + async execute(message) { const admins = message.guild.members.cache.filter(member => member.permissions.has(PermissionsBitField.Flags.Administrator)); diff --git a/commands/utils/banner.js b/commands/utils/banner.js index f22855a..9eaa8d4 100644 --- a/commands/utils/banner.js +++ b/commands/utils/banner.js @@ -3,6 +3,7 @@ const { EmbedBuilder } = require('discord.js'); module.exports = { name: 'banner', + aliases: ['bannière', 'banniere'], description: 'Affiche la bannière d\'un utilisateur', emote: '🔍', utilisation: 'banner <@user>', diff --git a/commands/utils/botinfo.js b/commands/utils/botinfo.js index 085c34c..ad1ef29 100644 --- a/commands/utils/botinfo.js +++ b/commands/utils/botinfo.js @@ -1,10 +1,12 @@ const { EmbedBuilder } = require("discord.js") module.exports = { name: 'botinfo', + aliases: ['botinfos'], description: 'Affiche les informations sur le bot', emote: '📄', utilisation: 'botinfo', category: 'utils', + async execute(message, args, client) { const embed = new EmbedBuilder() .setColor("#FFFFFF") diff --git a/commands/utils/calcul.js b/commands/utils/calcul.js index b59d060..3c9a0ea 100644 --- a/commands/utils/calcul.js +++ b/commands/utils/calcul.js @@ -2,6 +2,7 @@ const { EmbedBuilder } = require("discord.js"); module.exports = { name: 'calcul', + aliases: ['calc', 'math'], description: 'Calcul a math problem', emote: '🔍', utilisation: 'calcul ', diff --git a/commands/utils/channel.js b/commands/utils/channel.js index 5c2d0c9..3e6ca19 100644 --- a/commands/utils/channel.js +++ b/commands/utils/channel.js @@ -2,7 +2,12 @@ const { EmbedBuilder } = require('discord.js'); module.exports = { name: 'channel', + aliases: ['salon', 'channelinfo', 'saloninfo'], description: 'Affiche les informations sur un salon', + category: 'utils', + emote: '📌', + utilisation: 'channel <#salon>', + async execute(message) { const channel = message.mentions.channels.first() || message.channel; diff --git a/commands/utils/find.js b/commands/utils/find.js index 04534ba..7532226 100644 --- a/commands/utils/find.js +++ b/commands/utils/find.js @@ -1,6 +1,11 @@ module.exports = { name: 'find', + aliases: ['trouver'], description: 'Vérifie si un utilisateur est connecté à un salon vocal', + emote: '🔍', + utilisation: 'find <@user>', + category: 'utils', + async execute(message, args) { // Vérifie si un utilisateur a été mentionné const user = message.mentions.users.first(); diff --git a/commands/utils/help.js b/commands/utils/help.js index 69014f0..de5be3b 100644 --- a/commands/utils/help.js +++ b/commands/utils/help.js @@ -4,10 +4,12 @@ const GestionDb = new db.table("gestion"); module.exports = { name: 'help', + aliases: ['h', 'aide'], description: 'Affiche la liste des commandes', category: 'utils', emote: '📚', utilisation: 'help [commande]', + async execute(message, args, client) { const botId = client.user.id; const botInfo = GestionDb.get(botId); @@ -63,7 +65,7 @@ module.exports = { categories[command.category].push({ name: command.name, description: command.description, emote: command.emote, utilisation: command.utilisation}); } } - let totalCommands = client.commands.size; + let totalCommands = liste.length let description = `Sélectionnez une catégorie parmi les options ci-dessous pour obtenir de l'aide sur les commandes correspondantes.\n Il y a ${totalCommands} commandes disponibles\n\n`; for (const [category, commands] of Object.entries(categories)) { diff --git a/commands/utils/helpall.js b/commands/utils/helpall.js index e1320c9..56a20af 100644 --- a/commands/utils/helpall.js +++ b/commands/utils/helpall.js @@ -4,7 +4,12 @@ const GestionDb = new db.table("gestion"); module.exports = { name: 'helpall', + aliases: ['hall', 'aideall'], description: 'Liste toutes les commandes disponibles par niveau de permission', + emote: '📚', + utilisation: 'helpall', + category: 'utils', + async execute(message, args, client) { const botId = client.user.id; const guildId = message.guild.id; diff --git a/commands/utils/pic.js b/commands/utils/pic.js index 6019869..a47cf44 100644 --- a/commands/utils/pic.js +++ b/commands/utils/pic.js @@ -1,9 +1,12 @@ const { EmbedBuilder, ButtonStyle, ButtonBuilder, ActionRowBuilder } = require("discord.js") module.exports = { name: 'pic', + aliases: ['avatar', 'pfp', 'profilepic', 'profilepicture', 'pp'], description: 'Affiche l\'avatar d\'un utilisateur', category: 'utils', utilisation: 'pic [@user/userId]', + emote: '🖼️', + async execute(message, args, client) { let user; if (message.mentions.users.size > 0) { diff --git a/commands/utils/ping.js b/commands/utils/ping.js index 473afc8..3e66efb 100644 --- a/commands/utils/ping.js +++ b/commands/utils/ping.js @@ -2,10 +2,12 @@ const { ButtonStyle, ButtonBuilder, ActionRowBuilder } = require('discord.js'); module.exports = { name: 'ping', + aliases: ['latence'], description: 'Avoir la latence du bot.', emote: '⏱️', utilisation: 'ping', category: 'utils', + async execute(message, args, client) { const ping = new ButtonBuilder() .setCustomId('confirm') diff --git a/commands/utils/random.js b/commands/utils/random.js index 814f4e3..55c0ba1 100644 --- a/commands/utils/random.js +++ b/commands/utils/random.js @@ -9,6 +9,7 @@ module.exports = { emote: '🎲', utilisation: 'random [min] [max]', category: 'utils', + async execute(message, args, client) { if (!args[0] || !args[1]) { return message.reply('Veuillez spécifier 2 nombres.'); diff --git a/commands/utils/roleinfo.js b/commands/utils/roleinfo.js index 4e63e72..6935193 100644 --- a/commands/utils/roleinfo.js +++ b/commands/utils/roleinfo.js @@ -2,7 +2,12 @@ const { EmbedBuilder, PermissionsBitField } = require('discord.js'); module.exports = { name: 'roleinfo', + aliases: ['roleinfos', 'role-info', 'role-infos'], description: 'Affiche les informations sur un rôle', + category: 'utils', + emote: '🔒', + utilisation: 'roleinfo <@role>', + async execute(message, args) { if (args.length === 0) { return message.reply('Veuillez mentionner un rôle.'); diff --git a/commands/utils/servericon.js b/commands/utils/servericon.js index ab7fd70..035af82 100644 --- a/commands/utils/servericon.js +++ b/commands/utils/servericon.js @@ -2,6 +2,7 @@ const { EmbedBuilder, ButtonStyle, ButtonBuilder, ActionRowBuilder } = require(" module.exports = { name: 'servericon', + aliases: ['serverpfp', 'serverpic', 'serverpicture', 'serverpp'], description: 'Affiche l\'icone du serveur', emote: '🖼️', utilisation: 'servericon', diff --git a/commands/utils/serverinfo.js b/commands/utils/serverinfo.js index fe552b1..79ba408 100644 --- a/commands/utils/serverinfo.js +++ b/commands/utils/serverinfo.js @@ -1,10 +1,12 @@ const { EmbedBuilder } = require("discord.js") module.exports = { name: 'serverinfo', + aliases: ['si'], description: 'Affiche les informations sur le serveur', emote: '📄', utilisation: 'serverinfo', category: 'utils', + async execute(message, args, client) { const embed = new EmbedBuilder() .setAuthor({name: `${message.guild.name}`, iconURL: message.guild.iconURL({dynamic : true})}) diff --git a/commands/utils/snipe.js b/commands/utils/snipe.js index 141d64b..41621f1 100644 --- a/commands/utils/snipe.js +++ b/commands/utils/snipe.js @@ -1,6 +1,7 @@ const { EmbedBuilder, User } = require("discord.js") module.exports = { name: 'snipe', + aliases: ['sp'], description: 'Affiche le dernier message supprimé dans le salon', emote: '🔍', utilisation: 'snipe', diff --git a/commands/utils/stat.js b/commands/utils/stat.js index a7ef5ca..b2fdb6d 100644 --- a/commands/utils/stat.js +++ b/commands/utils/stat.js @@ -2,7 +2,12 @@ const { EmbedBuilder } = require('discord.js'); module.exports = { name: 'stat', - description: 'Affiche les informations du serveir', + aliases: ['stats'], + description: 'Affiche les informations du serveur', + emote: '📊', + utilisation: 'stat', + category: 'utils', + async execute(message) { const members = message.guild.members.cache; const onlineMembers = members.filter(member => member.presence && member.presence.status !== 'offline').size; diff --git a/commands/utils/support.js b/commands/utils/support.js index d9b9dce..6860d3e 100644 --- a/commands/utils/support.js +++ b/commands/utils/support.js @@ -1,10 +1,12 @@ const { EmbedBuilder } = require("discord.js") module.exports = { name: 'support', + aliases: ['supports'], description: 'Affiche le support du bot', emote: '📄', utilisation: 'support', category: 'utils', + async execute(message, args, client) { const embed = new EmbedBuilder() .setColor("#FFFFFF") diff --git a/commands/utils/uptime.js b/commands/utils/uptime.js index 8b740ce..3e26eb5 100644 --- a/commands/utils/uptime.js +++ b/commands/utils/uptime.js @@ -2,6 +2,7 @@ const { EmbedBuilder } = require("discord.js") module.exports = { name: 'uptime', + aliases: ['uptimes'], description: 'Affiche le temps d\'activité du bot', emote: '📄', utilisation: 'uptime', diff --git a/commands/utils/userinfo.js b/commands/utils/userinfo.js index 879f064..14eee69 100644 --- a/commands/utils/userinfo.js +++ b/commands/utils/userinfo.js @@ -1,6 +1,7 @@ const { EmbedBuilder } = require("discord.js") module.exports = { name: 'userinfo', + aliases: ['userinfos'], description: 'Affiche les informations sur un utilisateur', emote: '👤', utilisation: 'userinfo',