decord/source/modules/guild_role_subscriptions/RolePermissionUtils.tsx
github-actions cd74c1f217 chore: update source for alpha 345.5
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9667_m.js (378 MB)
2026-09-05 10:56:28 +00:00

78 lines
2.5 KiB
TypeScript

// Module ID: 4191
// Function ID: 4192
// Name: hasViewChannelPermission
// Dependencies: [2016, 1074, 1086, 2]
// Exports: hasViewChannelPermission, isChannelAccessDeniedBy, isChannelAccessGrantedBy
// Module 4191 (hasViewChannelPermission)
import set from "set" /* 2 */;
import ME from "ME" /* 1074 */;
import fromStringAll from "fromString" /* 1086 */;
import GuildRoleRecordTypeTag from "GuildRoleRecordTypeTag" /* 2016 */;
const hasPermission = GuildRoleRecordTypeTag.hasPermission;
const Permissions = ME.Permissions;
const result = set.fileFinishedImporting("modules/guild_role_subscriptions/RolePermissionUtils.tsx");
export const hasViewChannelPermission = function hasViewChannelPermission(arg0) {
return hasPermission(arg0, Permissions.VIEW_CHANNEL);
};
export const isChannelAccessDeniedBy = function isChannelAccessDeniedBy(isGuildVocal, deny) {
let tmp = null != deny;
if (tmp) {
let hasItem = fromStringAll.has(deny.deny, Permissions.VIEW_CHANNEL);
if (!hasItem) {
let isGuildVocalResult = isGuildVocal.isGuildVocal();
if (isGuildVocalResult) {
isGuildVocalResult = tmp2(1086).has(deny.deny, tmp4.CONNECT);
const tmp2Result = tmp2(1086);
}
hasItem = isGuildVocalResult;
}
tmp = hasItem;
const obj = fromStringAll;
tmp2 = importAll;
tmp4 = Permissions;
}
return tmp;
};
export const isChannelAccessGrantedBy = function isChannelAccessGrantedBy(isGuildVocal, deny) {
let tmp = null != deny;
if (tmp) {
let tmp3 = null != deny;
if (tmp3) {
let hasItem = fromStringAll.has(deny.deny, Permissions.VIEW_CHANNEL);
if (!hasItem) {
let isGuildVocalResult = isGuildVocal.isGuildVocal();
if (isGuildVocalResult) {
isGuildVocalResult = tmp4(1086).has(deny.deny, tmp6.CONNECT);
const tmp4Result = tmp4(1086);
}
hasItem = isGuildVocalResult;
}
tmp3 = hasItem;
const obj = fromStringAll;
tmp4 = importAll;
tmp6 = Permissions;
}
let tmp9 = !tmp3;
if (!tmp3) {
let hasItem1 = fromStringAll.has(deny.allow, Permissions.VIEW_CHANNEL);
if (hasItem1) {
const isGuildVocalResult1 = isGuildVocal.isGuildVocal();
hasItem = !isGuildVocalResult1;
if (isGuildVocalResult1) {
hasItem = tmp10(1086).has(deny.allow, tmp12.CONNECT);
const tmp10Result = tmp10(1086);
}
hasItem1 = hasItem;
}
tmp9 = hasItem1;
const obj3 = fromStringAll;
tmp10 = importAll;
tmp12 = Permissions;
}
tmp = tmp9;
}
return tmp;
};