1.0.5 • Published 3 years ago
@freitagfelipe/discord.js-pagination v1.0.5
@freitagfelipe/discord.js-pagination
- A simple way to send and paginate discord message embeds. Built on discord.js@^13.1.0.
this module is inspired and with a large part of the code of discord.js-pagination
Instalation
- npm i @freitagfelipe/discord.js-pagination
Usage
const pagination = require("@freitagfelipe/discord.js-pagination");
const { MessageEmbed } = require("discord.js);
const pageOne = new MessageEmbed();
const endPage = new MessageEmbed();
const pages = [
pageOne,
...,
pageN
];
// Message and pages arguments are required
// timeout default is equal to 60000
// emojiList default is equal to ['⏪', '⏩']
// OnlyAuthorCanReact default is equal to false
// endPage default is equal to undefined, but if you want the message to change after the timeout you can pass an embed in endPage
pagination(message, pages, timeout, emojiList, onlyAuthorCanReact, endPage);