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

36 lines
1.2 KiB
TypeScript
Raw Normal View History

2026-10-09 10:00:15 +00:00
// Module ID: 18297
// Function ID: 18298
// Name: GuildSettingsUtils
2026-10-09 10:00:15 +00:00
// Dependencies: [2119, 1085, 1097, 17464, 2]
2026-07-20 16:05:17 +00:00
// Exports: getPowerfulPermissionTitles, isRolePowerful
2026-10-09 10:00:15 +00:00
// Module 18297 (GuildSettingsUtils)
2026-10-03 08:58:59 +00:00
import BigFlagUtilsAll from "BigFlagUtils" /* 1097 */;
2026-10-08 09:57:35 +00:00
import GuildRoleRecord from "GuildRoleRecord" /* 2119 */;
2026-10-09 10:00:15 +00:00
import PermissionSpecUtilsDefault from "PermissionSpecUtils" /* 17464 */;
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;
};