pagination-discord-js-13
v1.0.3
Published
A simple utility to paginate discord embeds.
Downloads
8
Readme
pagination-discord-js-13
A simple utility to paginate discord embeds. Built on discord.js@^13.6.0.
Compatible with MessageEmbeds, RichEmbeds (not tested).
Pages are embeds.
Installation
npm install pagination-discord-js-13
Usage
Basic Bot Example
// Import the pagination-discord-js-13 package
const paginationEmbed = require('pagination-discord-js-13');
// 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 Discord = require('discord.js');
const embed1 = new MessageEmbed(); / const embed1 = new Discord.MessageEmbed();
// Create an array of embeds
pages = [
embed1,
embed2,
//....
embedn
];
// 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.
Donate Us
Donate Please support us, any amount will be good