@novelbrasil/discord.js-embed-menu
Advanced tools
Comparing version 1.2.4 to 1.2.5
{ | ||
"name": "@novelbrasil/discord.js-embed-menu", | ||
"description": "Easily create Discord.js embed menus with reactions and unlimited customisable pages.", | ||
"version": "1.2.4", | ||
"version": "1.2.5", | ||
"author": "eilex", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -153,2 +153,84 @@ <div align="center"> | ||
```js | ||
/* ... */ | ||
const menu = new DiscordEmbedMenu(interaction, [ | ||
{ | ||
name: `main`, | ||
content: new EmbedBuilder({ | ||
title: `Main menu`, | ||
description: `Please chose an action`, | ||
fields: [ | ||
{ | ||
name: `📝 Sub menu`, | ||
value: `Goes to another menu.`, | ||
inline: false | ||
}, | ||
{ | ||
name: `❌ Close`, | ||
value: `Close the menu.`, | ||
inline: false | ||
} | ||
] | ||
}), | ||
buttons: { | ||
submenu: { | ||
action: `submenu`, | ||
button: new ButtonBuilder().setCustomId(`submenu`) | ||
.setLabel(`Sub Menu`) | ||
.setEmoji(`📝`) | ||
.setStyle(ButtonStyle.Primary) | ||
}, | ||
delete: { | ||
action: `delete`, | ||
button: new ButtonBuilder().setCustomId(`delete`) | ||
.setLabel(`Close`) | ||
.setEmoji(`❌`) | ||
.setStyle(ButtonStyle.Danger) | ||
} | ||
}, | ||
}, | ||
{ | ||
name: `submenu`, | ||
content: new EmbedBuilder({ | ||
title: `Sub menu`, | ||
description: `Please chose an action`, | ||
fields: [ | ||
{ | ||
name: `📝 Sub menu`, | ||
value: `Goes to another menu.`, | ||
inline: false | ||
}, | ||
{ | ||
name: `❌ Close`, | ||
value: `Close the menu.`, | ||
inline: false | ||
} | ||
] | ||
}), | ||
buttons: { | ||
main: { | ||
action: `main`, | ||
button: new ButtonBuilder().setCustomId(`main`) | ||
.setLabel(`Back`) | ||
.setEmoji(`⬅️`) | ||
.setStyle(ButtonStyle.Primary) | ||
}, | ||
delete: { | ||
action: `delete`, | ||
button: new ButtonBuilder().setCustomId(`delete`) | ||
.setLabel(`Close`) | ||
.setEmoji(`❌`) | ||
.setStyle(ButtonStyle.Danger) | ||
} | ||
}, | ||
}, | ||
]); | ||
/* Run Menu.start() when you're ready to send the menu. */ | ||
menu.start({ followUp: true }); | ||
} | ||
/* ... */ | ||
``` | ||
## Special Destinations | ||
@@ -155,0 +237,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
477583
257