decord/source/modules/guild_role_subscriptions/RolePermissionUtils.tsx

76 lines
2.5 KiB
TypeScript
Raw Normal View History

// Module ID: 4237
// Function ID: 4238
// Name: RolePermissionUtils
// Dependencies: [2016, 1074, 1086, 2]
2026-07-29 08:29:29 +00:00
// Exports: hasViewChannelPermission, isChannelAccessDeniedBy, isChannelAccessGrantedBy
2026-07-20 16:05:17 +00:00
// Module 4237 (RolePermissionUtils)
import Constants from "Constants" /* 1074 */;
import BigFlagUtilsAll from "BigFlagUtils" /* 1086 */;
import GuildRoleRecord from "GuildRoleRecord" /* 2016 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
const hasPermission = GuildRoleRecord.hasPermission;
const Permissions = Constants.Permissions;
const result = size.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) {
let hasItem = BigFlagUtilsAll.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) {
isGuildVocalResult = tmp2(1086).has(deny.deny, tmp4.CONNECT);
const tmp2Result = tmp2(1086);
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;
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) {
let hasItem1 = BigFlagUtilsAll.has(deny.deny, Permissions.VIEW_CHANNEL);
if (!hasItem1) {
2026-07-29 08:29:29 +00:00
let isGuildVocalResult = isGuildVocal.isGuildVocal();
if (isGuildVocalResult) {
isGuildVocalResult = tmp4(1086).has(deny.deny, tmp6.CONNECT);
const tmp4Result = tmp4(1086);
2026-07-29 08:29:29 +00:00
}
hasItem1 = isGuildVocalResult;
2026-07-29 08:29:29 +00:00
}
tmp3 = hasItem1;
2026-07-29 08:29:29 +00:00
tmp4 = importAll;
tmp6 = Permissions;
}
let tmp9 = !tmp3;
if (!tmp3) {
let hasItem2 = BigFlagUtilsAll.has(deny.allow, Permissions.VIEW_CHANNEL);
if (hasItem2) {
2026-07-29 08:29:29 +00:00
const isGuildVocalResult1 = isGuildVocal.isGuildVocal();
let hasItem = !isGuildVocalResult1;
2026-07-29 08:29:29 +00:00
if (isGuildVocalResult1) {
hasItem = tmp10(1086).has(deny.allow, tmp12.CONNECT);
const tmp10Result = tmp10(1086);
2026-07-20 16:05:17 +00:00
}
hasItem2 = hasItem;
2026-07-20 16:05:17 +00:00
}
tmp9 = hasItem2;
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;
};