npm.io
1.0.5 • Published 4 years ago

@ryukobot/paginationembed

Licence
MIT
Version
1.0.5
Deps
0
Size
76 kB
Vulns
0
Weekly
0
Stars
2
DeprecatedThis package is deprecated

paginationembed

An Easy and Stylish way of doing Discord Embed Pagination

CI


Usage

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

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

const embed = new MessagePagination({
	embed: new MessageEmbed(),
	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 @ryukobot/paginationembed

or Yarn:

yarn add @ryukobot/paginationembed

Keywords