mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-06-08 16:15:04 +00:00
feat: add 'exclusive' option for role buttons; add documentation for role buttons; mark reaction roles as legacy
This commit is contained in:
parent
05334a772f
commit
784c54b22a
8 changed files with 144 additions and 20 deletions
|
@ -0,0 +1,10 @@
|
|||
import { TRoleButtonsConfigItem } from "../types";
|
||||
|
||||
// This function will be more complex in the future when the plugin supports select menus + sub-menus
|
||||
export function getAllRolesInButtons(buttons: TRoleButtonsConfigItem): string[] {
|
||||
const roles = new Set<string>();
|
||||
for (const option of buttons.options) {
|
||||
roles.add(option.role_id);
|
||||
}
|
||||
return Array.from(roles);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue