SHARE
TWEET

Untitled

a guest Aug 19th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. msg.react('◀').then( r => {
  2.             msg.react('▶')
  3.  
  4.  
  5.         const backwardsFilter = (reaction, user) => reaction.emoji.name === '◀' && user.id === message.author.id;
  6.         const forwardsFilter = (reaction, user) => reaction.emoji.name === '▶' && user.id === message.author.id;
  7.  
  8.  
  9.         const backwards = msg.createReactionCollector(backwardsFilter, { time: 2000000});
  10.         const forwards = msg.createReactionCollector(forwardsFilter, { time: 2000000});
  11.  
  12.  
  13.  
  14.         backwards.on('collect', r => {
  15.             if (page === 1) return;
  16.             page--;
  17.             embed.setDescription(pages[page-1]);
  18.             embed.setFooter(`Page ${page} of ${pages.length}`);
  19.             msg.edit(embed)
  20.         })
  21.         forwards.on('collect', r => {
  22.             if (page === pages.length) return;
  23.      
  24.       page++;
  25.             embed.setDescription(pages[page-1]);
  26.             embed.setFooter(`Page ${page} of ${pages.length}`);
  27.             msg.edit(embed)
  28.         })
  29.         })
  30.     })
  31.     }
  32. });
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