Skip to content

Paged Embed Menu

yoshisman8 edited this page Jun 18, 2019 · 1 revision

Paged Embed Menus

Paged embeds are nothing more than a simple array of embeds being displayed like a multi-page embed. They all contain a First/Last, Next/Previous buttons as well as a Minimize button that minimizes the embed.

In order to create a paged embed you must first create a new instance of it.

using Discord.Addon.InteractiveMenu;

Embed[] Pages; // This is a list of embeds that we are going to display
string Name = "Pages" // This text will be displayed when the menu is minimized

PagedEmbed Menu = New PagedEmbed(Name,Pages);

After we have the instance, we pass it to the MenuService to initialize it.

// By passing False as the third argument, the service will allow anyone to interact with this paged embed.
await MenuService.CreateMenu(Context,Menu,False);

Clone this wiki locally