This commit is contained in:
NoLogicAlan committed 2026-05-20 22:32:39 +03:00
1 parent 05fb38aabd
commit bc1fe82919
43 files changed
+122 -1784

No files matched your search

-4
View File
@@ -16,10 +16,8 @@ export async function run(msg, data) {
const channelCounts = new Map();
// Use VoiceStateCache API for both humans and bots
const cache = this.voiceCache ?? this.observedVoiceUsers;
if (cache) {
// Humans
if (typeof cache.iterateHumanUsers === "function") {
for (const [, state] of cache.iterateHumanUsers()) {
if (state.guildId !== guild.id) continue;
@@ -31,7 +29,6 @@ export async function run(msg, data) {
channelCounts.set(state.channelId, (channelCounts.get(state.channelId) ?? 0) + 1);
}
}
// Bots
if (typeof cache.iterateBotUsers === "function") {
for (const [, state] of cache.iterateBotUsers()) {
if (state.guildId !== guild.id) continue;
@@ -67,7 +64,6 @@ export async function run(msg, data) {
for (const [channelId, total] of channelCounts) {
const name = await getChannelName(channelId);
const entry = this.t(msg, "responses.test.channelEntry", { name, count: total });
// Guard against 4096-char embed description limit
if (desc.length + entry.length > 4080) break;
desc += entry;
}