decord/alpha/source/modules/guild/usePostableChannelCount.tsx
github-actions 45f5884862 chore: update source for alpha 348.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5012.js (118.4 MB)
2026-09-23 06:49:31 +00:00

36 lines
1.2 KiB
TypeScript

// Module ID: 17297
// Function ID: 17298
// Name: usePostableChannelCount
// Dependencies: [4460, 4462, 1074, 504, 1086, 2]
// Exports: default
// Module 17297 (usePostableChannelCount)
import BigFlagUtilsAll from "BigFlagUtils" /* 1086 */;
import GuildChannelStore from "GuildChannelStore" /* 4460 */;
import PermissionStore from "PermissionStore" /* 4462 */;
const require = globalThis.__r;
const require = fn;
let closure_4 = fn(4460).GUILD_SELECTABLE_CHANNELS_KEY;
const Permissions = fn(1074).Permissions;
const size = fn(2);
const result = size.fileFinishedImporting("modules/guild/usePostableChannelCount.tsx");
export default function useSendMessageChannelCount(arg0) {
_require = arg0;
let items = [GuildChannelStore];
const items1 = [arg0];
const stateFromStores = require("initialize").useStateFromStores(items, () => {
let items = GuildChannelStore.getChannels(closure_0)[closure_4];
if (items == null) {
items = [];
}
return items;
}, items1);
let num = 0;
if (0 !== stateFromStores.length) {
num = stateFromStores.filter((channel) => PermissionStore.can(BigFlagUtilsAll.combine(constants.SEND_MESSAGES, constants.VIEW_CHANNEL), channel.channel)).length;
}
return num;
};