decord/alpha/source/modules/guild/usePostableChannelCount.tsx
github-actions c6aa9eb120 chore: update source for alpha 349.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5030.js (118.4 MB)
2026-10-01 06:55:13 +00:00

36 lines
1.2 KiB
TypeScript

// Module ID: 16815
// Function ID: 16816
// Name: usePostableChannelCount
// Dependencies: [4496, 4498, 1074, 504, 1086, 2]
// Exports: default
// Module 16815 (usePostableChannelCount)
import BigFlagUtilsAll from "BigFlagUtils" /* 1086 */;
import GuildChannelStore from "GuildChannelStore" /* 4496 */;
import PermissionStore from "PermissionStore" /* 4498 */;
const require = globalThis.__r;
const require = fn;
let closure_4 = fn(4496).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;
};