decord/source/modules/channel/ChannelMemberCountStore.tsx

76 lines
2.3 KiB
TypeScript
Raw Normal View History

2026-08-08 06:10:11 +00:00
// Module ID: 12555
// Function ID: 12556
2026-07-29 08:29:29 +00:00
// Name: initialize
2026-08-08 06:10:11 +00:00
// Dependencies: [4994, 1372, 11, 589, 709, 2]
2026-07-23 10:11:24 +00:00
2026-08-08 06:10:11 +00:00
// Module 12555 (initialize)
2026-07-29 08:29:29 +00:00
import _handleConnectionOpen from "_handleConnectionOpen";
import ensureGuildLoaded from "ensureGuildLoaded";
import { PersistedStore } from "initialize";
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
let closure_4 = Object.freeze({ online: null, total: null });
let closure_5 = {};
let closure_6 = {};
let c7 = null;
class ChannelMemberCountStore extends PersistedStore {
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const prototype = ChannelMemberCountStore.prototype;
prototype["initialize"] = function initialize(arg0) {
let tmp = arg0;
this.waitFor(_handleConnectionOpen, ensureGuildLoaded);
if (arg0 == null) {
tmp = closure_5;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let closure_6 = tmp;
};
prototype["getState"] = function getState() {
return closure_6;
};
prototype["getMemberCount"] = function getMemberCount(arg0) {
let tmp = table[arg0];
if (tmp == null) {
tmp = closure_4;
}
return tmp;
};
prototype["requestCount"] = function requestCount(guild_id, id) {
let closure_7 = { guildId: guild_id, channelId: id };
const socket = store.getSocket();
const channelMemberCount = socket.requestChannelMemberCount(guild_id, id);
};
ChannelMemberCountStore.displayName = "ChannelMemberCountStore";
ChannelMemberCountStore.persistKey = "channelMemberCounts";
const channelMemberCountStore = new ChannelMemberCountStore(require("dispatcher"), {
2026-07-20 16:05:17 +00:00
CONNECTION_OPEN: function handleConnectionOpen() {
if (null != _null) {
2026-07-29 08:29:29 +00:00
const socket = store.getSocket();
2026-07-20 16:05:17 +00:00
const channelMemberCount = socket.requestChannelMemberCount(_null.guildId, _null.channelId);
}
2026-07-29 08:29:29 +00:00
const keys = importDefault(11).keys(closure_6);
const item = keys.forEach((arg0) => {
if (null == channel.getChannel(arg0)) {
2026-07-23 10:11:24 +00:00
delete tmp[tmp2];
2026-07-20 16:05:17 +00:00
}
});
},
CHANNEL_MEMBER_COUNT_UPDATE: function handleMemberCountUpdate(channelId) {
let online;
let total;
({ online, total } = channelId);
let tmp = null == online;
if (tmp) {
tmp = null == total;
}
if (!tmp) {
2026-07-29 08:29:29 +00:00
const obj = { online: null, total: null };
obj[0] = online;
obj[1] = total;
closure_6[channelId.channelId] = obj;
2026-07-20 16:05:17 +00:00
}
return true;
}
});
2026-07-29 08:29:29 +00:00
const result = require("DISCORD_EPOCH").fileFinishedImporting("modules/channel/ChannelMemberCountStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default channelMemberCountStore;