some fix /testing

This commit is contained in:
NoLogicAlan committed 2026-06-17 16:20:15 +03:00
1 parent dbe1c46dc5
commit 82aa296fbc
3 files changed
+10 -8

No files matched your search

+7 -7
View File
@@ -409,7 +409,7 @@ export class Remix {
} }
}, ALONE_CHECK_INTERVAL); }, ALONE_CHECK_INTERVAL);
this.players.checkVoiceChannels = async function (message) { this.players.checkVoiceChannels = async (message) => {
const userId = message?.author?.id ?? message?.message?.author?.id; const userId = message?.author?.id ?? message?.message?.author?.id;
const guildId = const guildId =
message?.channel?.guildId ?? message?.channel?.guildId ??
@@ -436,20 +436,20 @@ export class Remix {
const cId = cleanId(channelId); const cId = cleanId(channelId);
return { return {
channelId: cId, channelId: cId,
alreadyInVoice: self.players.playerMap.has(cId), alreadyInVoice: this.players.playerMap.has(cId),
hasHumans: self.voiceCache.hasHumansInChannel(cleanGuild, cId), hasHumans: this.voiceCache.hasHumansInChannel(cleanGuild, cId),
}; };
}; };
const seedCache = (channelId) => { const seedCache = (channelId) => {
if (!self.voiceCache.hasHumanUser(userId, cleanGuild)) { if (!this.voiceCache.hasHumanUser(userId, cleanGuild)) {
self.voiceCache.updateUser({ guildId: cleanGuild, userId, channelId, isBot: false }); this.voiceCache.updateUser({ guildId: cleanGuild, userId, channelId, isBot: false });
} }
}; };
logger.voice(`[checkVC] userId=${userId} guildId=${guildId} cleanGuild=${cleanGuild}`); logger.voice(`[checkVC] userId=${userId} guildId=${guildId} cleanGuild=${cleanGuild}`);
const observed = self.voiceCache.getUserLocation(cleanGuild, userId); const observed = this.voiceCache.getUserLocation(cleanGuild, userId);
if (observed && observed.channelId) { if (observed && observed.channelId) {
logger.voice(`[checkVC] HIT voiceCache → ${observed.channelId}`); logger.voice(`[checkVC] HIT voiceCache → ${observed.channelId}`);
return makeResult(observed.channelId); return makeResult(observed.channelId);
@@ -487,7 +487,7 @@ export class Remix {
} catch (e) { logger.voice(`[checkVC] guild error: ${e.message}`); } } catch (e) { logger.voice(`[checkVC] guild error: ${e.message}`); }
try { try {
const loc = self.voiceCache.getHumanUser(userId, cleanGuild); const loc = this.voiceCache.getHumanUser(userId, cleanGuild);
if (loc && loc.channelId) { if (loc && loc.channelId) {
logger.voice(`[checkVC] HIT voiceCache scan → ${loc.channelId}`); logger.voice(`[checkVC] HIT voiceCache scan → ${loc.channelId}`);
return makeResult(loc.channelId); return makeResult(loc.channelId);
+1
View File
@@ -12,6 +12,7 @@
*/ */
import { escapeMarkdown as _escapeMarkdown, truncate as _truncate } from "@fluxerjs/util"; import { escapeMarkdown as _escapeMarkdown, truncate as _truncate } from "@fluxerjs/util";
import { logger } from "./constants/Logger.mjs";
/** /**
* Strip non-digit characters from a value, returning a clean ID string. * Strip non-digit characters from a value, returning a clean ID string.
+2 -1
View File
@@ -14,7 +14,8 @@ import https from "https";
import { Utils, cleanId } from "./Utils.mjs"; import { Utils, cleanId } from "./Utils.mjs";
import { PROVIDERS } from "./constants/providers.mjs"; import { PROVIDERS } from "./constants/providers.mjs";
import { logger } from "./constants/Logger.mjs"; import { logger } from "./constants/Logger.mjs";
import { NL_DEFAULT_PASSWORD } from "./Player.mjs";
const NL_DEFAULT_PASSWORD = "youshallnotpass";
const nl = workerData?.data?.nodelink ?? {}; const nl = workerData?.data?.nodelink ?? {};
const NL_HOST = nl.host ?? "localhost"; const NL_HOST = nl.host ?? "localhost";