Role select menus allow users to select one or more Discord roles from the server. They’re commonly used for role assignment, permissions management, or role-based features.Documentation Index
Fetch the complete documentation index at: https://djs-core.cleboost.com/llms.txt
Use this file to discover all available pages before exploring further.
Role select menus dynamically show all roles available in the server. Users can select from roles they have permission to see, making it perfect for role assignment features.
Creating a Role Select Menu
Role select menus in djs-core are created using theRoleSelectMenu class. Each select menu component file in src/components/selects/role/ is automatically registered.
Basic Role Select Menu
Accessing Selected Roles
Theinteraction.roles collection contains all selected roles:
Role Select Menu Data
Role select menus can receive custom data using.setData().
Component Definition
[src/components/selects/role/assign.ts]