decord/source/modules/guild_settings/GuildSettingsUtils.tsx

35 lines
1.2 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 16945
// Function ID: 16946
2026-07-29 08:29:29 +00:00
// Name: isRolePowerful
2026-08-24 06:08:38 +00:00
// Dependencies: [1985, 676, 506, 16144, 2]
2026-07-20 16:05:17 +00:00
// Exports: getPowerfulPermissionTitles, isRolePowerful
2026-08-24 06:08:38 +00:00
// Module 16945 (isRolePowerful)
import set from "set" /* 2 */;
import fromStringAll from "fromString" /* 506 */;
import GuildRoleRecordTypeTag from "GuildRoleRecordTypeTag" /* 1985 */;
import getPermissionOptionsDefault from "getPermissionOptions" /* 16144 */;
import ME from "ME" /* 676 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
const hasPermission = GuildRoleRecordTypeTag.hasPermission;
2026-07-29 08:29:29 +00:00
({ ElevatedPermissions: c4, ElevatedPermissionsList: c5 } = ME);
2026-08-24 06:08:38 +00:00
const result = set.fileFinishedImporting("modules/guild_settings/GuildSettingsUtils.tsx");
2026-07-20 16:05:17 +00:00
export const isRolePowerful = function isRolePowerful(role) {
2026-08-24 06:08:38 +00:00
return fromStringAll.hasAny(role.permissions, closure_4);
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 = [];
2026-08-24 06:08:38 +00:00
getPermissionOptionsDefault;
2026-07-29 08:29:29 +00:00
for (const item10015 of closure_5) {
let str = item10015;
let tmp3 = hasPermission;
if (hasPermission(arg1, item10015)) {
let tmp4 = item10015;
let arr = items.push(tmp2[str.toString(str)].title);
}
continue;
2026-07-20 16:05:17 +00:00
}
return items;
};