Skip to main content

embedPages

This is an example of embedPages

With Customization

const simplydjs = require("simply-djs");

messageCreate Event (Any Command)

// messageCreate Event

let embed1 = new Discord.MessageEmbed().setTitle("Page 1");

let embed2 = new Discord.MessageEmbed().setTitle("Page 2");

let pages = [embed1, embed2]; // REQUIRED

// its still possible without embed
// let pages = ['page1', 'page2', 'page3']

simplydjs.embedPages(client, message, pages, {
firstEmoji: "emoji id",
backEmoji: "emoji id",
delEmoji: "emoji id",
forwardEmoji: "emoji id",
lastEmoji: "emoji id",

btncolor: "colors",
delcolor: "colors",
skipcolor: "colors",

skipBtn: true,
delBtn: true
});
INFO

Without Customization

messageCreate Event (any command)

// messageCreate Event

let embed1 = // embed

let embed2 = // embed

let pages = [embed1, embed2] // REQUIRED

// its still possible without embed
// let pages = ['page1', 'page2', 'page3']

simplydjs.embedPages(client, message, pages)
TIP

Slash Support.

The package supports Auto Slash Recognition ! So no more slash options.

Slash command format

{
name: 'embedpages',
description: 'Just embedPages.. Using simply-djs'
}

Output

image

Options for embedPages function

OptionsTypeRequiredDefaultDescription
pagesArray of Embedsโœ“noneArray of Embeds to make it as Pages
slashBooleanโœ˜falseSlash Support for the embedPages (need to be in a slash command)
pgCountBooleanโœ˜falseShows Page Count
timeoutNumberโœ˜120000 (2 min)Disables the button after certain time (in milliseconds)

Button Emojis

OptionsTypeRequiredDefaultDescription
firstEmojiEmoji IDโœ˜โชEmoji of First Page Button
backEmojiEmoji IDโœ˜โ—€๏ธEmoji of Previous Page Button
delEmojiEmoji IDโœ˜๐Ÿ—‘๏ธEmoji of Delete Message Button
forwardEmojiEmoji IDโœ˜โ–ถ๏ธEmoji for Next Page Button
lastEmojiEmoji IDโœ˜โฉEmoji for Last Page Button (Not Required when skipBtn is false)

Button colors

OptionsTypeRequiredDefaultDescription
btncolorButton Styleโœ˜SUCCESSColor of the Next/Previous Page Buttons
delcolorButton Styleโœ˜DANGERColor of Delete Page Button
skipcolorButton Styleโœ˜PRIMARYColor of First/Last Page Buttons

Button Options

OptionsTypeRequiredDefaultDescription
skipBtnBooleanโœ˜trueEnables/Disables First/Last Page Buttons
delBtnBooleanโœ˜trueEnables/Disables Delete Button