button-paginator12

1.2.0 • Public • Published

Button Paginator

For discord.js@12.5.3

Button Paginator is a easy to use package for pagination of any number of embeds! Using discord.js@12.5.3 and discord-buttons

Pagination means that you can browse through embeds as if it was a book!

You can easily use arrow buttons to swap pages between embeds

Custom TEXT, EMOJI, and COLOR is possible too!

How to use

const paginator = require('button-paginator12') //Defining the package
const discord = require('discord.js') //Defining Discord.js (12.5.3)

module.exports.run = async (Client, message) => { //use your own handler type here

//Code for Embed in Page 1
const embed1 = new discord.MessageEmbed()
.setTitle("This is Page 1")
.setDescription("This is the description for the embed for Page 1")

//Code for Embed in Page 2
const embed2 = new discord.MessageEmbed()
.setTitle("This is Page 2")
.setDescription("This is the description for the embed for Page 2")

//Merge the pages 
let pages = [embed1, embed2]  

//Send the message
paginator(message, pages)

}

YES ITS SO EASY!

Images of it in use!

Page 1 Page 2 Expired



Expert Side - How to change button Label, Style, Emoji, and change Expire Timeout

Warning! You will have to modify the module itself

  1. Open the module in node_modules/button-paginator12/index.js
  2. Follow the steps below to change the data

1) Go to Line39 for Left Button's text!

You can change details such as STYLE, LABEL and EMOJI only! Please do not change the ID, or else it wont work.

If you change the ID then please reset!

2) Go to Line40 for Right Button's text!

You can change details such as STYLE, LABEL and EMOJI only! Please do not change the ID, or else it wont work.

If you change the ID then please reset!

3) Go to Line42 for Left Button's TIMEOUT DISABLED text!

You can change details such as STYLE, LABEL and EMOJI only! Please do not change the ID, or else it wont work.

If you change the ID then please reset!

4) Go to Line43 for Right Button's TIMEOUT DISABLED text!

You can change details such as STYLE, LABEL and EMOJI only! Please do not change the ID, or else it wont work.

If you change the ID then please reset!

5) Go to Line48 to change the TIEMOUT

Change the time in {time: ms('TIME')} ms stands for MILLISECONDS

Eg: const col = await curPage.createButtonCollector(filter, { time: ms('90s') })

CHANGING ANYTHING ELSE OF THIS CODE IS NOT RECOMMENDED

Creator Info

Discord

Support

Package Sidebar

Install

npm i button-paginator12

Weekly Downloads

5

Version

1.2.0

License

ISC

Unpacked Size

6.93 kB

Total Files

4

Last publish

Collaborators

  • nishant_pro