decord/source/modules/guild_onboarding/DefaultChannelUtils.tsx

51 lines
1.9 KiB
TypeScript
Raw Normal View History

2026-07-28 08:39:19 +00:00
// Module ID: 5095
// Function ID: 43980
2026-07-20 16:05:17 +00:00
// Name: getDefaultPermissionsForChannel
2026-07-28 08:39:19 +00:00
// Dependencies: [1909, 1348, 653, 483, 566, 3798, 2]
2026-07-20 16:05:17 +00:00
// Exports: canChannelBeDefault, useCanChannelBeDefault
2026-07-28 08:39:19 +00:00
// Module 5095 (getDefaultPermissionsForChannel)
2026-07-23 10:11:24 +00:00
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import closure_4 from "_isNativeReflectConstruct";
import ME from "ME";
let closure_5;
let closure_6;
const require = arg1;
2026-07-20 16:05:17 +00:00
function getDefaultPermissionsForChannel(channel) {
if (null != channel) {
const GUILD_VOCAL = constants.GUILD_VOCAL;
if (GUILD_VOCAL.has(channel.type)) {
2026-07-23 10:11:24 +00:00
let VIEW_CHANNEL = importAll(483).combine(constants2.VIEW_CHANNEL, constants2.CONNECT);
const obj = importAll(483);
2026-07-20 16:05:17 +00:00
}
return VIEW_CHANNEL;
}
VIEW_CHANNEL = constants2.VIEW_CHANNEL;
}
2026-07-23 10:11:24 +00:00
({ ChannelTypesSets: closure_5, Permissions: closure_6 } = ME);
const result = require("ME").fileFinishedImporting("modules/guild_onboarding/DefaultChannelUtils.tsx");
2026-07-20 16:05:17 +00:00
export const useCanChannelBeDefault = function useCanChannelBeDefault(arg0, arg1) {
2026-07-23 10:11:24 +00:00
const _require = arg0;
let closure_1 = arg1;
const items = [_isNativeReflectConstruct, closure_4];
return _require(566).useStateFromStores(items, () => {
const channel = outer1_4.getChannel(callback);
let isChannelGatedResult = outer1_3.isChannelGated(closure_0, callback);
2026-07-20 16:05:17 +00:00
if (!isChannelGatedResult) {
2026-07-23 10:11:24 +00:00
isChannelGatedResult = callback(outer1_2[5]).canEveryoneRole(tmp2, channel);
const obj = callback(outer1_2[5]);
2026-07-20 16:05:17 +00:00
}
return isChannelGatedResult;
});
};
export const canChannelBeDefault = function canChannelBeDefault(guild_id, id) {
let isChannelGatedResult = channelGated.isChannelGated(guild_id, id);
if (!isChannelGatedResult) {
2026-07-28 08:39:19 +00:00
isChannelGatedResult = importAll(3798).canEveryoneRole(tmp, store.getChannel(id));
const obj = importAll(3798);
2026-07-20 16:05:17 +00:00
}
return isChannelGatedResult;
};