1.0.8 • Published 4 years ago
discord.js-pagination-fork v1.0.8
this is fork
yes yes
discord.js-pagination-fork
Original had a lack of attention and support from a normal point of view. Forked it, will respond to issues and try to fix them.
Installation
npm install discord.js-pagination-fork
Usage
Basic Bot Example
// Import the discord.js-pagination package
const paginationEmbed = require('discord.js-pagination-fork');
// Use either MessageEmbed or RichEmbed to make pages
// Keep in mind that Embeds should't have their footers set since the pagination method sets page info there
const { MessageEmbed } = require('discord.js');
const embed1 = new MessageEmbed();
const embed2 = new MessageEmbed();
// Create an array of embeds
var pages = [
embed1,
embed2
];
// Call the paginationEmbed method, first two arguments are required
// emojiList is the pageturners defaults to ['⏪', '⏩']
// timeout is the time till the reaction collectors are active, after this you can't change pages (in ms), defaults to 120000
paginationEmbed(message, pages, emojiList, timeout);
// There you go, now you have paged embeds
Preview
Here is the package used for paging song queue.