decord/source/modules/guild_onboarding/DefaultChannelUtils.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

56 lines
2.2 KiB
TypeScript

// Module ID: 7102
// Function ID: 7103
// Name: useCanChannelBeDefault
// Dependencies: [2013, 1957, 1074, 1086, 504, 4204, 2]
// Exports: canChannelBeDefault, useCanChannelBeDefault
// Module 7102 (useCanChannelBeDefault)
import fromStringAll from "fromString" /* 1086 */;
import applyOverwritesAll from "applyOverwrites" /* 4204 */;
import closure_3 from "isSubscriptionGated" /* 2013 */;
import closure_4 from "ensureGuildLoaded" /* 1957 */;
import ME from "ME" /* 1074 */;
const require = arg1;
({ ChannelTypesSets: c5, Permissions: closure_6 } = ME);
const result = require("set").fileFinishedImporting("modules/guild_onboarding/DefaultChannelUtils.tsx");
export const useCanChannelBeDefault = function useCanChannelBeDefault(arg0, arg1) {
const _require = arg0;
closure_1 = arg1;
const items = [closure_3, closure_4];
return _require(504).useStateFromStores(items, () => {
const channel = closure_1_4.getChannel(callback);
if (null != channel) {
const GUILD_VOCAL = closure_1_5.GUILD_VOCAL;
if (GUILD_VOCAL.has(channel.type)) {
let VIEW_CHANNEL = callback(closure_1_2[3]).combine(closure_1_6.VIEW_CHANNEL, closure_1_6.CONNECT);
const obj = callback(closure_1_2[3]);
}
let isChannelGatedResult = closure_1_3.isChannelGated(closure_0, callback);
if (!isChannelGatedResult) {
isChannelGatedResult = callback(closure_1_2[5]).canEveryoneRole(VIEW_CHANNEL, channel);
const obj2 = callback(closure_1_2[5]);
}
return isChannelGatedResult;
}
VIEW_CHANNEL = closure_1_6.VIEW_CHANNEL;
});
};
export const canChannelBeDefault = function canChannelBeDefault(guild_id, id) {
channel = channel.getChannel(id);
if (null != channel) {
const GUILD_VOCAL = constants.GUILD_VOCAL;
if (GUILD_VOCAL.has(channel.type)) {
let VIEW_CHANNEL = fromStringAll.combine(constants2.VIEW_CHANNEL, constants2.CONNECT);
const obj2 = fromStringAll;
}
let isChannelGatedResult = channelGated.isChannelGated(guild_id, id);
if (!isChannelGatedResult) {
isChannelGatedResult = applyOverwritesAll.canEveryoneRole(VIEW_CHANNEL, channel.getChannel(id));
const obj3 = applyOverwritesAll;
}
return isChannelGatedResult;
}
VIEW_CHANNEL = constants2.VIEW_CHANNEL;
};