embedPages
An powerful yet customizable Embed Paginator
Program
- Javascript
- Typescript
const simplydjs = require("simply-djs");
import simplydjs from "simply-djs";
let pages = [] // Contains array of MessageEmbed.
simplydjs.embedPages(interaction, pages, {
// options (Optional)
})
Output
Arguments:
simplydjs.embedCreate(
interaction: Discord.Message | Discord.CommandInteraction,
pages: Discord.MessageEmbed[]
options: pagesOption
)
- interaction:
Discord.Message
|Discord.CommandInteraction
- pages:
Discord.MessageEmbed[]
- options:
pagesOption
Options pagesOption
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
buttons | Pagebuttons | ❌ | default buttons | Pass a Pagebuttons Object to customize the button |
skips | boolean | ❌ | true | Enable/Disable the first/last page buttons |
delete | boolean | ❌ | true | Enable/Disable the Delete message button |
dynamic | boolean | ❌ | false | Change buttons corresponding to the page you are in |
count | boolean | ❌ | false | Show the current page number you are in |
rows | MessageActionRow[] | ❌ | none | Add custom rows to the message |
timeout | number | ❌ | 120000 | Show the current page number you are in |
disable | 'Label' (or) 'Emoji' (or) 'None' | ❌ | label | Render the button with an emoji or a label. |
Pagebuttons option
Pagebuttons
Parameter | Type | Description |
---|---|---|
firstBtn | btnTemplate | Pass an btnTemplate Object to customize the button |
nextBtn | btnTemplate | Pass an btnTemplate Object to customize the button |
backBtn | btnTemplate | Pass an btnTemplate Object to customize the button |
lastBtn | btnTemplate | Pass an btnTemplate Object to customize the button |
deleteBtn | btnTemplate | Pass an btnTemplate Object to customize the button |