daily pastebin goal
66%
SHARE
TWEET

Untitled

a guest Nov 17th, 2018 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. if (cmd === `/help`) {
  3.  
  4.   let pages = ['', '', ]; // inside '' each page
  5.   let page = 1;
  6.  
  7.  const embed = new Discord.RichEmbed()
  8.     .setColor("RANDOM")
  9.     .setFooter(`Page ${page} of ${pages.length}`)
  10.     .setDescription(pages[page-1])
  11.  
  12.   message.channel.send(embed).then(msg => {
  13.    
  14.     msg.react('⏪').then( r => {
  15.       msg.react('⏩')
  16.      
  17.       const backwardsFilter = (reaction, user) => reaction.emoji.name === '⏪' && user.id === message.author.id;
  18.       const forwardsFilter = (reaction, user) => reaction.emoji.name === '⏩' && user.id === message.author.id;
  19.      
  20.       const backwards = msg.createReactionCollector(backwardsFilter, { time: 250000 });
  21.       const forwards = msg.createReactionCollector(forwardsFilter, { time: 250000 });
  22.      
  23.      
  24.       backwards.on('collect', r => {
  25.         if (page === 1) return;
  26.         page--;
  27.         embed.setDescription(pages[page-1]);
  28.         embed.addField(`Command Help`, `__**Moderation Commands**__
  29.  
  30. **/ban** Bans a user from the server!
  31. */ban {user} {reason}*
  32.  
  33. **/kick** Kicks a user from the server!
  34. */kick {user} {reason}*
  35.  
  36. **/warn** Warns a user!
  37. */warn {user} {reason}*
  38.  
  39. **/checkup** Checks bot for errors!
  40. */checkup*
  41.  
  42. **/ping** Measures the bot response time in ms!
  43. */ping*
  44.  
  45. *to navigate between pages, please remember to remove old reaction before reacting again*
  46.  
  47. **Next page = Fun/leisure commands!**`)
  48.         embed.setFooter(`Page ${page} of ${pages.length}`);
  49.         msg.edit(embed)
  50.       })
  51.      
  52.       forwards.on('collect', r => {
  53.         if (page === pages.length) return;
  54.         page++;
  55.         embed.setDescription(pages[page-1]);
  56.         embed.addField(`Command Help`, `__**Fun Commands!**__
  57.  
  58. **/speedy**
  59. *User specific command!*
  60.  
  61. **/hike**
  62. *User specific command!*
  63.  
  64. **/sam**
  65. *User specific command!*
  66.  
  67. **/amy**
  68. *User specific command!*
  69.  
  70. **/lewis**
  71. *User specific command!*
  72.  
  73. **/jess**
  74. *User specific command!*
  75.  
  76. **/olwin**
  77. *User specific command!*
  78.  
  79. **/amber**
  80. *User specific command!*
  81.  
  82. **/info**
  83. *Some information about the bot!*
  84.  
  85. **/rps**
  86. *Play rock paper scissors with the bot!*
  87. */rps {option} = Rock/Paper/Scissors*
  88.  
  89. **/number**
  90. *Picks a random number!*
  91. */number*
  92.  
  93. *to navigate between pages, please remember to remove old reaction before reacting again*
  94.  
  95. **Previous Page = Moderation Commands!**`)
  96.  
  97.  
  98.         embed.setFooter(`Page ${page} of ${pages.length}`);
  99.         msg.edit(embed)
  100.       })
  101.    
  102.     })
  103.  
  104.   })
  105.  
  106. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top