pagination-discord-js-13

1.0.3 • Public • Published

NPM info

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

Demo Here is the package used for paging song queue.

Donate Us

Donate Please support us, any amount will be good

Package Sidebar

Install

npm i pagination-discord-js-13

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

69.6 kB

Total Files

7

Last publish

Collaborators

  • luciferas