decord/alpha/source/modules/guild_settings/GuildSettingsUtils.tsx

36 lines
1.2 KiB
TypeScript
Raw Permalink Normal View History

2026-10-13 12:43:34 +00:00
// Module ID: 18433
// Function ID: 18434
// Name: GuildSettingsUtils
2026-10-13 12:43:34 +00:00
// Dependencies: [2120, 1085, 1097, 17597, 2]
2026-07-20 16:05:17 +00:00
// Exports: getPowerfulPermissionTitles, isRolePowerful
2026-10-13 12:43:34 +00:00
// Module 18433 (GuildSettingsUtils)
2026-10-03 08:58:59 +00:00
import BigFlagUtilsAll from "BigFlagUtils" /* 1097 */;
2026-10-10 08:08:14 +00:00
import GuildRoleRecord from "GuildRoleRecord" /* 2120 */;
2026-10-13 12:43:34 +00:00
import PermissionSpecUtilsDefault from "PermissionSpecUtils" /* 17597 */;
2026-10-03 08:58:59 +00:00
import Constants from "Constants" /* 1085 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
2026-10-03 08:58:59 +00:00
let closure_4;
let hasOwnProperty;
const hasPermission = GuildRoleRecord.hasPermission;
({ ElevatedPermissions: closure_4, ElevatedPermissionsList: hasOwnProperty } = Constants);
const result = size.fileFinishedImporting("modules/guild_settings/GuildSettingsUtils.tsx");
2026-07-20 16:05:17 +00:00
export const isRolePowerful = function isRolePowerful(role) {
2026-10-03 08:58:59 +00:00
const obj = BigFlagUtilsAll;
return obj.hasAny(role.permissions, React3);
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
export const getPowerfulPermissionTitles = function getPowerfulPermissionTitles(arg0, arg1) {
2026-07-20 16:05:17 +00:00
const items = [];
PermissionSpecUtilsDefault;
2026-10-03 08:58:59 +00:00
for (const item10015 of hasOwnProperty) {
2026-07-29 08:29:29 +00:00
let str = item10015;
if (hasPermission(arg1, item10015)) {
let arr = items.push(tmp2[str.toString(str)].title);
}
continue;
2026-07-20 16:05:17 +00:00
}
return items;
};