decord/source/modules/guild_role_subscriptions/RolePermissionUtils.tsx

79 lines
2.5 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 4017
// Function ID: 4018
2026-07-29 08:29:29 +00:00
// Name: hasViewChannelPermission
2026-08-25 06:04:03 +00:00
// Dependencies: [1986, 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-25 06:04:03 +00:00
// Module 4017 (hasViewChannelPermission)
2026-08-24 06:08:38 +00:00
import set from "set" /* 2 */;
import fromStringAll from "fromString" /* 506 */;
import ME from "ME" /* 676 */;
2026-08-25 06:04:03 +00:00
import GuildRoleRecordTypeTag from "GuildRoleRecordTypeTag" /* 1986 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
const hasPermission = GuildRoleRecordTypeTag.hasPermission;
const Permissions = ME.Permissions;
const result = set.fileFinishedImporting("modules/guild_role_subscriptions/RolePermissionUtils.tsx");
2026-07-29 08:29:29 +00:00
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-08-24 06:08:38 +00:00
let hasItem = fromStringAll.has(deny.deny, Permissions.VIEW_CHANNEL);
2026-07-29 08:29:29 +00:00
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;
2026-08-24 06:08:38 +00:00
const obj = fromStringAll;
2026-07-29 08:29:29 +00:00
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-08-24 06:08:38 +00:00
let hasItem = fromStringAll.has(deny.deny, Permissions.VIEW_CHANNEL);
2026-07-29 08:29:29 +00:00
if (!hasItem) {
let isGuildVocalResult = isGuildVocal.isGuildVocal();
if (isGuildVocalResult) {
isGuildVocalResult = tmp4(506).has(deny.deny, tmp6.CONNECT);
const tmp4Result = tmp4(506);
}
hasItem = isGuildVocalResult;
}
tmp3 = hasItem;
2026-08-24 06:08:38 +00:00
const obj = fromStringAll;
2026-07-29 08:29:29 +00:00
tmp4 = importAll;
tmp6 = Permissions;
}
let tmp9 = !tmp3;
if (!tmp3) {
2026-08-24 06:08:38 +00:00
let hasItem1 = fromStringAll.has(deny.allow, Permissions.VIEW_CHANNEL);
2026-07-29 08:29:29 +00:00
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;
2026-08-24 06:08:38 +00:00
const obj3 = fromStringAll;
2026-07-29 08:29:29 +00:00
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;
};