decord/source/modules/channel/getConnectionsRoles.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

54 lines
1.9 KiB
TypeScript

// Module ID: 5409
// Function ID: 5410
// Name: ChannelTypes
// Dependencies: [2015, 1979, 1074, 1086, 2]
// Exports: default
// Module 5409 (ChannelTypes)
import closure_2 from "createGuildRoleRecordFromRust" /* 2015 */;
import closure_3 from "createGuildRecordFromRust" /* 1979 */;
import ME from "ME" /* 1074 */;
import importAllResult from "fromString" /* 1086 */;
({ ChannelTypes, Permissions } = ME);
let items = [, , , , , , ];
({ GUILD_TEXT: arr[0], GUILD_VOICE: arr[1], GUILD_ANNOUNCEMENT: arr[2], GUILD_FORUM: arr[3], GUILD_APP: arr[4], PUBLIC_THREAD: arr[5], PRIVATE_THREAD: arr[6] } = ChannelTypes);
let closure_5 = importAllResult.combine(Permissions.VIEW_CHANNEL, Permissions.SEND_MESSAGES);
const result = require("set").fileFinishedImporting("modules/channel/getConnectionsRoles.tsx");
export default function getConnectionsRoles(type) {
if (null != type) {
if (items.includes(type.type)) {
guild = guild.getGuild(type.guild_id);
if (null == guild) {
items = [];
} else {
const _Object = Object;
const values = Object.values(type.permissionOverwrites);
const found = values.filter((type) => {
let tmp = 0 === type.type;
if (tmp) {
const role = closure_1_2.getRole(guild.id, type.id);
let guild_connections;
if (role != null) {
const tags = role.tags;
if (tags != null) {
guild_connections = tags.guild_connections;
}
}
tmp = null === guild_connections;
}
if (tmp) {
tmp = !guild(closure_1_1[3]).hasAny(type.deny, closure_1_5);
const obj = guild(closure_1_1[3]);
}
return tmp;
});
const mapped = found.map((id) => closure_1_2.getRole(guild.id, id.id));
items = mapped.filter((arg0) => null != arg0);
}
return items;
}
}
return [];
};