Advertisement
Guest User

Untitled

a guest
Jan 20th, 2020
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const {Discord,RichEmbed} = require('discord.js');
  2. const {prefix,token,classic_roles} = require('../config.json');
  3. const logs = require('../logs/logs');
  4.  
  5. module.exports.run = async (bot, message, args) => {
  6.     var list_groups = [];
  7.    
  8.     var name = [];
  9.     var dscription = [];
  10.     var access = [];
  11.     var groups = [];
  12.  
  13.     bot.commands.forEach((f,i) => {
  14.         if (!list_groups.includes(f.help.groups)) {
  15.             list_groups.push(f.help.groups)
  16.         }
  17.         name.push(f.help.name)
  18.         dscription.push(f.help.description)
  19.         access.push(f.help.access)
  20.         groups.push(f.help.groups)
  21.     });
  22.         let i = 0;
  23.         const embed = new RichEmbed()
  24.         if (args.length < 1 ) {
  25.             embed.setColor('#5B4DCA');
  26.             while (i < list_groups.length) {
  27.                 let x = 0;
  28.                 embed.setTitle(`${list_groups[i]}`)
  29.                 while (x < groups.length) {
  30.                     if (groups[x] === list_groups[i]) {
  31.                         embed.addField('test1','test2')
  32.                     }
  33.                     x++;
  34.                 }
  35.                 message.channel.send(embed)
  36.                 i++;
  37.             }
  38.         }
  39.     }
  40.     logs.logs('commands','!help',message.author);
  41. }
  42.  
  43. module.exports.help = {
  44.     name: "help",
  45.     description: "Vous permet d'obtenir toutes les commandes accessibles pour vos rôles.",
  46.     access: "Public",
  47.     groups: "Outils"
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement