decord/source/modules/permissions/useFirstGloballyViewbleGuildChannelId.tsx

45 lines
1.4 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 15389
// Function ID: 15390
2026-07-29 08:29:29 +00:00
// Name: useFirstGloballyViewbleGuildChannelId
2026-08-24 06:08:38 +00:00
// Dependencies: [1981, 505, 589, 4029, 2]
2026-07-20 16:05:17 +00:00
// Exports: useFirstGloballyViewbleGuildChannelId
2026-08-24 06:08:38 +00:00
// Module 15389 (useFirstGloballyViewbleGuildChannelId)
import closure_3 from "comparator" /* 1981 */;
import { Permissions } from "sum" /* 505 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/permissions/useFirstGloballyViewbleGuildChannelId.tsx");
2026-07-20 16:05:17 +00:00
export const useFirstGloballyViewbleGuildChannelId = function useFirstGloballyViewbleGuildChannelId(guildId) {
2026-07-23 10:11:24 +00:00
const _require = guildId;
2026-08-24 06:08:38 +00:00
const items = [closure_3];
2026-07-20 16:05:17 +00:00
const items1 = [guildId];
2026-07-29 08:29:29 +00:00
return _require(589).useStateFromStores(items, () => {
2026-07-23 10:11:24 +00:00
if (null != closure_0) {
2026-08-24 06:08:38 +00:00
const selectableChannels = closure_1_3.getSelectableChannels(tmp);
2026-07-29 08:29:29 +00:00
for (const item10010 of selectableChannels) {
let channel = item10010.channel;
let tmp6 = channel;
2026-08-24 06:08:38 +00:00
let tmp7 = closure_1_1;
let tmp8 = closure_1_2;
let obj2 = closure_1_1(closure_1_2[3]);
let tmp9 = closure_1_4;
if (obj2.canEveryone(closure_1_4.VIEW_CHANNEL, channel)) {
2026-07-29 08:29:29 +00:00
let tmp10 = obj;
obj.return();
return channel.id;
2026-07-20 16:05:17 +00:00
}
}
let id;
2026-07-29 08:29:29 +00:00
if (selectableChannels != null) {
2026-07-20 16:05:17 +00:00
const first = selectableChannels[0];
2026-07-29 08:29:29 +00:00
if (first != null) {
2026-07-20 16:05:17 +00:00
id = first.channel.id;
}
}
return id;
}
}, items1);
};