mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-06-08 08:05:03 +00:00
10 lines
381 B
TypeScript
10 lines
381 B
TypeScript
import { TRoleButtonsConfigItem } from "../types.js";
|
|
|
|
// 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);
|
|
}
|