decord/beta/source/modules/guild/usePostableChannelCount.tsx
github-actions 9b6fea255e chore: update source for beta 346.12
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-18 19:45:33 +00:00

36 lines
1.2 KiB
TypeScript

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