Skip to main content

menuPages

This is an example of menuPages/dropdownPages (Two names)

With Customization

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

messageCreate Event (any command)

// messageCreate Event

let embed = // embed
let emb2 = // embed

simplydjs.dropdownPages(message, {
type: 1, // default: 1
embed: embed,
placeHolder: 'menuPages using simply-djs',
rows: [] // custom row to send the message with more buttons
data:[
{
label: 'Label',
desc: 'description',
emoji: 'emoji id',
embed: emb2, // embed sent when clicked
},
// etc..
]
})

INFO

Without Customization

messageCreate Event (any command)

// messageCreate Event

let embed = // embed
let emb2 = // embed

simplydjs.dropdownPages(message, {
embed: embed
data:[
{
label: 'Label',
desc: 'description',
emoji: 'emoji id',
embed: emb2, // embed sent when clicked
},
// etc..
]
})
TIP

Slash Support.

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

Slash command format

{
name: 'menupages',
description: 'menuPages using simply-djs',
}

Output

image

Options for menuPages function

OptionsTypeRequiredDefaultDescription
embedEmbedโœ“noneHomepage
dataArrayโœ“noneData to make it pages
slashBooleanโœ˜falseSlash Support for the menuPages (need to be in a slash command)
OptionsTypeRequiredDefaultDescription
typeNumberโœ˜1Type 1 - Ephemeral Reply / Type 2 - Message Edit
rowsArrayโœ˜noneArray of MessageActionRow
placeHolderStringโœ˜'Dropdown Page'Place Holder of the menu

Options for data

OptionsTypeRequiredDefaultDescription
labelStringโœ“noneLabel for the option to send embed
descStringโœ“noneDescription for the option to send embed
emojiEmoji IDโœ˜noneEmoji for the option to send embed
embedEmbedโœ“noneEmbed sent when the option is selected

Delete Option

OptionsTypeRequiredDefaultDescription
delOptionBooleanโœ˜trueDisable/Enable the Delete Option
delLabelStringโœ˜DeleteLabel of the delete option in menu
delDescStringโœ˜Delete the Select Menu EmbedDescription of delete option in menu
delEmojiEmoji IDโœ˜โŒEmoji of Delete Message Button