Advertisement
Guest User

Hi

a guest
Dec 8th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.56 KB | None | 0 0
  1. const hEmbed = new Discord.RichEmbed()
  2. .setColor(colors.light_orange)
  3. .setTitle('**Help Commands • 2**')
  4. .addField("c!help", 'Displays a list of all available commands')
  5. .addField("c!help [command]", 'Sends more info on a specific command')
  6. .setFooter(`Page ${page} of ${pages.length}`)
  7.  
  8. message.author.send(hEmbed).then(msg => {
  9.  
  10. msg.react('◀️').then(r => {
  11. msg.react('▶️')
  12.  
  13. //Filters
  14. const backFilter = (reaction, user) => reaction.emoji.name === '◀️' && user.id === message.author.id;
  15. const forwardFilter = (reaction, user) => reaction.emoji.name === '▶️' && user.id === message.author.id;
  16.  
  17. const back = msg.createReactionCollector(backFilter, { time: 60000});
  18. const forward = msg.createReactionCollector(forwardFilter, { time: 60000});
  19.  
  20. back.on('collect', r => {
  21. if(page === 1) return;
  22. page--;
  23. hEmbed.setColor(colors.light_orange)
  24. hEmbed.setTitle('**Help Commands • 2**')
  25. hEmbed.addField("c!help", 'Displays a list of all available commands')
  26. hEmbed.addField("c!help [command]", 'Sends more info on a specific command')
  27. hEmbed.setFooter(`Page ${page} of ${pages.length}`)
  28. msg.edit(hEmbed)
  29. })
  30.  
  31. forward.on('collect', r => {
  32. if(page === pages.length) return;
  33. page++;
  34. hEmbed.setColor(colors.light_orange)
  35. hEmbed.setTitle("**Moderation Commands • 7**")
  36. hEmbed.addField("c!ban [member]", 'Bans a member from the server')
  37. hEmbed.addField("c!tempban [member]", 'Temporarily bans a member from the server')
  38. hEmbed.addField("c!clear [ammount]", 'Clears specified ammount of messages in a particular channel')
  39. hEmbed.addField("c!kick [member]", 'Kicks a member from the server')
  40. hEmbed.addField("c!mute [member]", 'Mutes a member from the whole server')
  41. hEmbed.addField("c!tempmute [member] [duration]", 'Temporarly mutes a member')
  42. hEmbed.addField("c!serverinfo", 'Displays info about the server')
  43. hEmbed.setFooter(`Page ${page} of ${pages.length}`)
  44. msg.edit(hEmbed)
  45. })
  46. })
  47. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement