fix: resolve bugs in voice, filter, dashboard, and stats handling

- Fix filter command using stale track reference instead of current queue track

- Fix playnext null check before editing status message

- Fix join command using raw channel ID before cleaning it

- Fix GatewayHandler passing wrong isBot flag in voice state cache

- Fix Dashboard shared server filtering (was returning empty, now filters correctly)

- Fix avatar fallback using discriminator (deprecated) → use user ID instead

- Refactor Player.mjs: extract ConnectionState/LKRoomEvent to FluxerRevoice constants

- Refactor Player.mjs: replace local formatMsHelper with Utils.prettifyMS

- Add Logger.guild() method; use it in GatewayHandler instead of logger.info()

- Remove rbl-stats module from modules.json

- Remove unused empty event listeners in PlayerManager

- Remove unused CRITICAL_PERMISSIONS import from GatewayHandler
This commit is contained in:
NoLogicAlan committed 2026-05-25 19:22:20 +03:00
1 parent 58464e6862
commit b581722c46
19 files changed
+45 -92

No files matched your search

+4 -4
View File
@@ -4,7 +4,7 @@ import { logger } from "./constants/Logger.mjs";
import { ServerSettings } from "./Settings.mjs";
import { get247ChannelMode, remove247ChannelMode } from "./constants/Helpers247.mjs";
import { VoiceStateCache } from "./constants/VoiceStateCache.mjs";
import { REQUIRED_BOT_PERMISSIONS, CRITICAL_PERMISSIONS } from "./MessageHandler.mjs";
import { REQUIRED_BOT_PERMISSIONS } from "./MessageHandler.mjs";
/**
* GatewayHandler — manages raw WebSocket gateway events, voice-state tracking,
@@ -126,7 +126,7 @@ export class GatewayHandler {
` All missing: ${missingNames.join(", ")}`
);
} else {
logger.info(
logger.guild(
`[GuildCreate] Server ${guildId} is missing optional permissions: ${result.optionalMissing.join(", ")}`
);
}
@@ -745,12 +745,12 @@ export class GatewayHandler {
if (evictGuildId && evictUserId) {
const currentLoc = remix.voiceCache.getUserLocation(evictGuildId, evictUserId);
if (currentLoc && currentLoc.channelId === evictEntry.channelId) {
remix.voiceCache.updateUser({ guildId: evictGuildId, userId: evictUserId, channelId: null, isBot: false });
remix.voiceCache.updateUser({ guildId: evictGuildId, userId: evictUserId, channelId: null, isBot: evictEntry.isBot ?? false });
}
}
}
}
if (nextKey) this._prevVoiceState.set(nextKey, { channelId, guildId: guildId ?? prev?.guildId });
if (nextKey) this._prevVoiceState.set(nextKey, { channelId, guildId: guildId ?? prev?.guildId, isBot: isBot === true });
} else {
if (prevKey) this._prevVoiceState.delete(prevKey);
}