3
0
Fork 0
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:
Dragory 2022-04-23 17:30:37 +03:00
parent 05334a772f
commit 784c54b22a
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
8 changed files with 144 additions and 20 deletions

View file

@ -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);
}