decord/source/modules/guild_role_subscriptions/RolePermissionUtils.tsx

57 lines
1.8 KiB
TypeScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 3751
2026-07-27 11:26:19 +00:00
// Function ID: 28612
2026-07-20 16:05:17 +00:00
// Name: isChannelAccessDeniedBy
2026-07-25 08:10:48 +00:00
// Dependencies: [1912, 653, 483, 2]
2026-07-20 16:05:17 +00:00
// Exports: hasViewChannelPermission, isChannelAccessGrantedBy
2026-07-25 08:10:48 +00:00
// Module 3751 (isChannelAccessDeniedBy)
2026-07-23 10:11:24 +00:00
import { hasPermission } from "GuildRoleRecordTypeTag";
import { Permissions } from "ME";
2026-07-20 16:05:17 +00:00
function isChannelAccessDeniedBy(isGuildVocal, deny) {
let tmp = null != deny;
if (tmp) {
2026-07-23 10:11:24 +00:00
const tmp5 = !importAll(483).has(deny.deny, Permissions.VIEW_CHANNEL);
2026-07-20 16:05:17 +00:00
let tmp6 = !tmp5;
if (tmp5) {
let isGuildVocalResult = isGuildVocal.isGuildVocal();
if (isGuildVocalResult) {
2026-07-23 10:11:24 +00:00
isGuildVocalResult = importAll(483).has(deny.deny, Permissions.CONNECT);
const obj2 = importAll(483);
2026-07-20 16:05:17 +00:00
}
tmp6 = isGuildVocalResult;
}
tmp = tmp6;
2026-07-23 10:11:24 +00:00
const obj = importAll(483);
2026-07-20 16:05:17 +00:00
}
return tmp;
}
2026-07-23 10:11:24 +00:00
const result = require("fromHexReverseArray").fileFinishedImporting("modules/guild_role_subscriptions/RolePermissionUtils.tsx");
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
export const hasViewChannelPermission = function hasViewChannelPermission(closure_0) {
return hasPermission(closure_0, Permissions.VIEW_CHANNEL);
2026-07-20 16:05:17 +00:00
};
export { isChannelAccessDeniedBy };
export const isChannelAccessGrantedBy = function isChannelAccessGrantedBy(isGuildVocal, allow) {
let tmp = null != allow;
if (tmp) {
let tmp3 = !isChannelAccessDeniedBy(isGuildVocal, allow);
if (tmp3) {
2026-07-23 10:11:24 +00:00
const tmp7 = !importAll(483).has(allow.allow, Permissions.VIEW_CHANNEL);
2026-07-20 16:05:17 +00:00
let tmp8 = !tmp7;
if (!tmp7) {
let hasItem = !isGuildVocal.isGuildVocal();
if (!hasItem) {
2026-07-23 10:11:24 +00:00
hasItem = importAll(483).has(allow.allow, Permissions.CONNECT);
const obj2 = importAll(483);
2026-07-20 16:05:17 +00:00
}
tmp8 = hasItem;
}
tmp3 = tmp8;
2026-07-23 10:11:24 +00:00
const obj = importAll(483);
2026-07-20 16:05:17 +00:00
}
tmp = tmp3;
}
return tmp;
};