Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case "help":
- var array1 = []
- var array2 = []
- var array3 = []
- // de aici
- fs.readdir("./comenzi/", (err, files) => {
- if(err) console.error(err)
- let jsfiles = files.filter(f => f.split(".").pop() == "js");
- jsfiles.forEach((f , i) => {
- let props = require(`./comenzi/${f}`);
- if(props.help.category == "mod") {
- array1.push(`» **${prefix}${props.help.name}** - ${props.help.description}`)
- } else if(props.help.category == "fun") {
- array2.push(`» **${prefix}${props.help.name}** - ${props.help.description}`)
- } else if(props.help.category == "misc") {
- array3.push(`» **${prefix}${props.help.name}** - ${props.help.description}`)
- }
- // message.channel.send({embed})
- }) // incheie foreach jsfiles.
- // console.log(`ARRAY1 :\n${array1}\n\nARRAY2 :\n${array2}\n\nARRAY3 :\n${array3}`)
- var embed = new Discord.RichEmbed()
- .addField(":popcorn: Fun Commands", array2.join("\n"))
- .addField(":hammer: Moderator Commands", array1.join("\n"))
- .addField(":tools: Misc Commands", array3.join("\n"))
- .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.")
- .setFooter("Requested by "+message.author.username,message.author.avatarURL)
- .setTimestamp()
- .setColor("#ffffff")
- message.channel.send({embed})
- // 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")}`)
- array1 = []
- array2 = []
- array3 = []
- }) // incheie readdir
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement