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
Options for embedPages function
Options | Type | Required | Default | Description |
---|---|---|---|---|
pages | Array of Embeds | โ | none | Array of Embeds to make it as Pages |
slash | Boolean | โ | false | Slash Support for the embedPages (need to be in a slash command) |
pgCount | Boolean | โ | false | Shows Page Count |
timeout | Number | โ | 120000 (2 min) | Disables the button after certain time (in milliseconds) |
Button Emojis
Options | Type | Required | Default | Description |
---|---|---|---|---|
firstEmoji | Emoji ID | โ | โช | Emoji of First Page Button |
backEmoji | Emoji ID | โ | โ๏ธ | Emoji of Previous Page Button |
delEmoji | Emoji ID | โ | ๐๏ธ | Emoji of Delete Message Button |
forwardEmoji | Emoji ID | โ | โถ๏ธ | Emoji for Next Page Button |
lastEmoji | Emoji ID | โ | โฉ | Emoji for Last Page Button (Not Required when skipBtn is false) |
Button colors
Options | Type | Required | Default | Description |
---|---|---|---|---|
btncolor | Button Style | โ | SUCCESS | Color of the Next/Previous Page Buttons |
delcolor | Button Style | โ | DANGER | Color of Delete Page Button |
skipcolor | Button Style | โ | PRIMARY | Color of First/Last Page Buttons |
Button Options
Options | Type | Required | Default | Description |
---|---|---|---|---|
skipBtn | Boolean | โ | true | Enables/Disables First/Last Page Buttons |
delBtn | Boolean | โ | true | Enables/Disables Delete Button |