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) 21The type of menuPage. (1 for ephemeral reply & 2 for editing message)
rowsMessageActionRow[]noneAdd custom rows to the message
embedMessageEmbednoneThe embed of your message that is sent with the select menu
deletedeleteOptdefault 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
labelstringnoneThe label of the option
descstringnoneThe description of the option
embedMessageEmbednoneThe embed of your message when the option is selected
emojistringnoneThe emoji of the option
deleteOpt option

deleteOpt

ParameterTypeRequiredDefaultDescription
enablebooleantrueEnable/ Disable the delete option
labelstringnoneThe label of the delete option
descstringnoneThe description of the delete option
emojistringnoneThe emoji of the delete option