Advertisement
Guest User

Untitled

a guest
Feb 21st, 2018
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. case "help":
  2.             var array1 = []
  3.             var array2 = []
  4.             var array3 = []
  5.  
  6.             // de aici
  7.  
  8.             fs.readdir("./comenzi/", (err, files) => {
  9.     if(err) console.error(err)
  10.  
  11.  
  12.  
  13.         let jsfiles = files.filter(f => f.split(".").pop() == "js");
  14.  
  15.  
  16.         jsfiles.forEach((f , i) => {
  17.  
  18.             let props = require(`./comenzi/${f}`);
  19.  
  20.             if(props.help.category == "mod") {
  21.                 array1.push(**${prefix}${props.help.name}** - ${props.help.description}`)
  22.             } else if(props.help.category == "fun") {
  23.                 array2.push(**${prefix}${props.help.name}** - ${props.help.description}`)
  24.             } else if(props.help.category == "misc") {
  25.                 array3.push(**${prefix}${props.help.name}** - ${props.help.description}`)
  26.             }
  27. //      message.channel.send({embed})
  28.         })  // incheie foreach jsfiles.
  29.         // console.log(`ARRAY1 :\n${array1}\n\nARRAY2 :\n${array2}\n\nARRAY3 :\n${array3}`)
  30.         var embed = new Discord.RichEmbed()
  31.         .addField(":popcorn: Fun Commands", array2.join("\n"))
  32.         .addField(":hammer: Moderator Commands", array1.join("\n"))
  33.         .addField(":tools: Misc Commands", array3.join("\n"))
  34.         .addField(":musical_note: Music Commands (VERY BUGGY)", "» **$play** - Searches and plays a song.\n» **$skip** - Skips the currently playing song.\n» **$queue** - Shows the current queue.\n» **$clearqueue** - Clears the queue.\n» **$volume** - Sets the volume for the music.\n» **$pause** - Pauses the currently playing song.\n» **$resume** - Resumes the paused song.\n» **$leave** - Makes the BOT leave the voice channel.")
  35.         .setFooter("Requested by "+message.author.username,message.author.avatarURL)
  36.         .setTimestamp()
  37.         .setColor("#ffffff")
  38.  
  39.         message.channel.send({embed})
  40.             // message.channel.send(`**:hammer: Moderator Commands:**\n\n${array1.join("\n")}\n\n**:popcorn: Fun Commands:**\n\n${array2.join("\n")}\n\n**:tools: Misc Commands:**\n\n${array3.join("\n")}`)
  41.         array1 = []
  42.         array2 = []
  43.         array3 = []
  44. }) // incheie readdir
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement