decord/source/modules/guild_role_subscriptions/RolePermissionUtils.tsx

75 lines
2.4 KiB
TypeScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 4013
// Function ID: 4014
2026-07-29 08:29:29 +00:00
// Name: hasViewChannelPermission
2026-08-11 06:20:06 +00:00
// Dependencies: [1984, 676, 506, 2]
2026-07-29 08:29:29 +00:00
// Exports: hasViewChannelPermission, isChannelAccessDeniedBy, isChannelAccessGrantedBy
2026-07-20 16:05:17 +00:00
2026-08-15 05:55:55 +00:00
// Module 4013 (hasViewChannelPermission)
2026-07-23 10:11:24 +00:00
import { hasPermission } from "GuildRoleRecordTypeTag";
import { Permissions } from "ME";
2026-07-29 08:29:29 +00:00
const result = require("fromString").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) {
2026-07-20 16:05:17 +00:00
let tmp = null != deny;
if (tmp) {
2026-07-29 08:29:29 +00:00
let hasItem = importAll(506).has(deny.deny, Permissions.VIEW_CHANNEL);
if (!hasItem) {
2026-07-20 16:05:17 +00:00
let isGuildVocalResult = isGuildVocal.isGuildVocal();
if (isGuildVocalResult) {
2026-07-29 08:29:29 +00:00
isGuildVocalResult = tmp2(506).has(deny.deny, tmp4.CONNECT);
const tmp2Result = tmp2(506);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
hasItem = isGuildVocalResult;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp = hasItem;
const obj = importAll(506);
tmp2 = importAll;
tmp4 = Permissions;
2026-07-20 16:05:17 +00:00
}
return tmp;
};
2026-07-29 08:29:29 +00:00
export const isChannelAccessGrantedBy = function isChannelAccessGrantedBy(isGuildVocal, deny) {
let tmp = null != deny;
2026-07-20 16:05:17 +00:00
if (tmp) {
2026-07-29 08:29:29 +00:00
let tmp3 = null != deny;
2026-07-20 16:05:17 +00:00
if (tmp3) {
2026-07-29 08:29:29 +00:00
let hasItem = importAll(506).has(deny.deny, Permissions.VIEW_CHANNEL);
if (!hasItem) {
let isGuildVocalResult = isGuildVocal.isGuildVocal();
if (isGuildVocalResult) {
isGuildVocalResult = tmp4(506).has(deny.deny, tmp6.CONNECT);
const tmp4Result = tmp4(506);
}
hasItem = isGuildVocalResult;
}
tmp3 = hasItem;
const obj = importAll(506);
tmp4 = importAll;
tmp6 = Permissions;
}
let tmp9 = !tmp3;
if (!tmp3) {
let hasItem1 = importAll(506).has(deny.allow, Permissions.VIEW_CHANNEL);
if (hasItem1) {
const isGuildVocalResult1 = isGuildVocal.isGuildVocal();
hasItem = !isGuildVocalResult1;
if (isGuildVocalResult1) {
hasItem = tmp10(506).has(deny.allow, tmp12.CONNECT);
const tmp10Result = tmp10(506);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
hasItem1 = hasItem;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp9 = hasItem1;
const obj3 = importAll(506);
tmp10 = importAll;
tmp12 = Permissions;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp = tmp9;
2026-07-20 16:05:17 +00:00
}
return tmp;
};