Form Types
Roles Multiple Select
DBD.formTypes.rolesMultiSelect(disabled, required, includeBots, hideHigherRoles),
disabled
boolean
requiredIndicate if the select should be disabled or not.
required
boolean
requiredIndicate if the multiple select should be required or not.
includeBots
boolean
Indicate if the bot roles should be included or not.
hideHigherRoles
boolean
Indicate if the higher roles should be hidden or not.
Data required for getActualSet function
Array of Strings (Roles IDs) | or an empty Array.
Data returned
Array of Strings (Roles IDs) | or an empty Array.
Example Usage
{
optionId: 'multiple_welcome_roles',
optionName: "Multiple Welcome Roles",
optionDescription: "Select multiple roles given to user on join.",
optionType: DBD.formTypes.rolesMultiSelect(false, true),
getActualSet: async ({guild}) => {
return welcomeRoles[guild.id] || []; // !
},
setNew: async ({guild,newData}) => {
welcomeRoles[guild.id] = newData;
return;
}
},
Was this page helpful?