Discord.js V 14.0.x
Easyutil-Discordjs is a library that allows you to manage easily navigation embeds.
🌐 Windows version:
npm i easyutil-discordjs
// 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);
// 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);