2.1.0 • Published 2 years ago

discord-paginate v2.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

discorde-paginate

This is a maintiained fork of discord.js-pagination A simple utility to paginate discord embeds. Built on discord.js@^13.3.1 (master). Compatible with MessageEmbeds. Pages are embeds.

Installation

  • npm install discord-paginate

Usage

Basic Bot Example

// Import the discord.js-paginate package
const { paginationEmbed } = require('discord-paginate');

// Use MessageEmbed 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 MesssageEmbed();
// .....
// Create an array of embeds
pages = [
	embed1,
	embed2,
	// ....
	embedn
];

// emojiList paramater is for the page-turners, defaults to ['⏪', '⏩']
// timeout is the duration (in ms) after an interaction where the bot stops accepting interactions, defualts to 120000 (120s or 2m)
paginationEmbed(msg /* D.js Message */, pages /* array of MessageEmbed objects */, emojiList /* optional */, timeout /* optional */);
// There you go, now you have paged embeds
2.1.0

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago