2.0.0 • Published 1 year ago

@jacany/paginationembed v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

paginationembed

An Easy and Stylish way of doing Discord Embed Pagination

CI


Usage

const { EmbedBuilder } = require("discord.js");
const { MessagePagination } = require("@jacany/paginationembed");

const array = ["Element 1", "Element 2", "Element 3"];

const embed = new MessagePagination({
	embed: new EmbedBuilder(),
	itemsPerPage: 2,
	startPage: 1,
	title: "Values",
	timeout: 300000, // Milliseconds before expiry
	message: Message, // Pass your Message Object
	array,
	callbackfn: (value, index) => `**${index + 1}.** ${value}`,
});

embed.build();

Output

Screenshot_20210917_142849

Installing

With NPM:

npm install @jacany/paginationembed

or Yarn:

yarn add @jacany/paginationembed