Select Menus
A guide for using select menus in ShadowCore.
Select Menus
Select menus are interactive dropdown menus that allow users to select an option from a list. In ShadowCore, you can easily create and manage select menus as part of the interactive components system. These menus are perfect for creating sophisticated user interfaces with multiple options.
📂 Menu Structure
Select Menus in ShadowCore are organized within the /menus
directory and categorized into subfolders.
Example Folder Structure:
⚙️ Properties
The Select Menu component allows you to specify the following properties:
🧩 Usage
To create a select menu, define the customId and the run function that will handle the user’s selection. Here’s an example of creating a basic select menu:
Handling Dynamic Select Menus
You can also create dynamic select menus using special IDs, similar to buttons. Here’s an example:
In this example, the splitSpecialId
method splits the customId
into components, allowing you to use dynamic values (e.g., ticket IDs) along with the selected option from the menu.