44 lines
1.4 KiB
TypeScript
44 lines
1.4 KiB
TypeScript
// Module ID: 15389
|
|
// Function ID: 15390
|
|
// Name: useFirstGloballyViewbleGuildChannelId
|
|
// Dependencies: [1981, 505, 589, 4029, 2]
|
|
// Exports: useFirstGloballyViewbleGuildChannelId
|
|
|
|
// Module 15389 (useFirstGloballyViewbleGuildChannelId)
|
|
import closure_3 from "comparator" /* 1981 */;
|
|
import { Permissions } from "sum" /* 505 */;
|
|
|
|
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(589).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);
|
|
};
|