npm.io
2.0.1 • Published 3 years ago

easyutil-discordjs

Licence
MIT
Version
2.0.1
Deps
1
Size
29 kB
Vulns
0
Weekly
0
Stars
3

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);

Keywords