Skip to main content

menuPages

An Embed paginator using Select Menus

Program​

const simplydjs = require("simply-djs");
simplydjs.menuPages(interaction, {
data: [
{...}
], // array of data objects (required)
// options (Optional)
})

Output​

image

Arguments:​

simplydjs.menuPages(
interaction: Discord.Message | Discord.CommandInteraction,
options: menuEmbOptions
)

Options menuEmbOptions​

ParameterTypeRequiredDefaultDescription
type1 (or) 2❌1The type of menuPage. (1 for ephemeral reply & 2 for editing message)
rowsMessageActionRow[]❌noneAdd custom rows to the message
embedMessageEmbed✅noneThe embed of your message that is sent with the select menu
deletedeleteOpt❌default objectThe data object for the custom delete menu option
datadataObj[]✅noneThe data necessary to create the pages. (Array of dataObj)
placeHolderstring❌'Dropdown pages'Placeholder of the select menu
dataObj option

dataObj​

ParameterTypeRequiredDefaultDescription
labelstring✅noneThe label of the option
descstring✅noneThe description of the option
embedMessageEmbed✅noneThe embed of your message when the option is selected
emojistring✅noneThe emoji of the option
deleteOpt option

deleteOpt​

ParameterTypeRequiredDefaultDescription
enableboolean✅trueEnable/ Disable the delete option
labelstring❌noneThe label of the delete option
descstring❌noneThe description of the delete option
emojistring❌noneThe emoji of the delete option