decord/source/modules/permissions/useFirstGloballyViewbleGuildChannelId.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

44 lines
1.4 KiB
TypeScript

// Module ID: 16062
// Function ID: 16063
// Name: useFirstGloballyViewbleGuildChannelId
// Dependencies: [2012, 1085, 504, 4204, 2]
// Exports: useFirstGloballyViewbleGuildChannelId
// Module 16062 (useFirstGloballyViewbleGuildChannelId)
import closure_3 from "comparator" /* 2012 */;
import { Permissions } from "sum" /* 1085 */;
const require = arg1;
const result = require("set").fileFinishedImporting("modules/permissions/useFirstGloballyViewbleGuildChannelId.tsx");
export const useFirstGloballyViewbleGuildChannelId = function useFirstGloballyViewbleGuildChannelId(guildId) {
const _require = guildId;
const items = [closure_3];
const items1 = [guildId];
return _require(504).useStateFromStores(items, () => {
if (null != closure_0) {
const selectableChannels = closure_1_3.getSelectableChannels(tmp);
for (const item10010 of selectableChannels) {
let channel = item10010.channel;
let tmp6 = channel;
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)) {
let tmp10 = obj;
obj.return();
return channel.id;
}
}
let id;
if (selectableChannels != null) {
const first = selectableChannels[0];
if (first != null) {
id = first.channel.id;
}
}
return id;
}
}, items1);
};