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
Options for menuPages function
Options | Type | Required | Default | Description |
---|---|---|---|---|
embed | Embed | โ | none | Homepage |
data | Array | โ | none | Data to make it pages |
slash | Boolean | โ | false | Slash Support for the menuPages (need to be in a slash command) |
Menu Options
Options | Type | Required | Default | Description |
---|---|---|---|---|
type | Number | โ | 1 | Type 1 - Ephemeral Reply / Type 2 - Message Edit |
rows | Array | โ | none | Array of MessageActionRow |
placeHolder | String | โ | 'Dropdown Page' | Place Holder of the menu |
Options for data
Options | Type | Required | Default | Description |
---|---|---|---|---|
label | String | โ | none | Label for the option to send embed |
desc | String | โ | none | Description for the option to send embed |
emoji | Emoji ID | โ | none | Emoji for the option to send embed |
embed | Embed | โ | none | Embed sent when the option is selected |