2.0.1 ā¢ Published 2 years ago
easyutil-discordjs v2.0.1
Easyutil-Discordjs
ā¹ What version i need for discord.js?
Discord.js V 14.0.x
š Introduction
Easyutil-Discordjs is a library that allows you to manage easily navigation embeds.
š„ Installing the package
š Windows version:
npm i easyutil-discordjs
š¦ Example of use - (Basic)
// Language: TypeScript
import { EmbedBuilder } from 'discord.js';
import { PaginationBuilder } from 'easyutil-discordjs';
// Your interaction command handler...
const embeds: EmbedBuilder[] = [];
for (let i = 1; i <= 5; i++) {
embeds.push(new EmbedBuilder().setTitle(`Category ${i}`).setDescription("Description"));
}
// The NavEmbedBuilder class initialize with an array of embeds
const nav = new PaginationBuilder({embeds: embeds});
nav.start(interaction);
š· Screenshots:
š¦ Example of use - (Advanced)
// Language: TypeScript
import { EmbedBuilder } from 'discord.js';
import { PaginationBuilder } from 'easyutil-discordjs';
// Your interaction command handler...
const embeds: EmbedBuilder[] = [];
for (let i = 1; i <= 5; i++) {
embeds.push(new EmbedBuilder().setTitle(`Category ${i}`).setDescription("Description"));
}
// The NavEmbedBuilder class initialize with an array of embeds
const nav = new PaginationBuilder({
embeds: embeds, options: {
message: "Botones expirados!",
buttons: {first: 'ā', left: 'š»', mid: 'š¤', right: 'ā', last: 'š'}
}
});
nav.start(interaction);