From 82aa296fbca76a1d9dfe8395e392b9be7d118071 Mon Sep 17 00:00:00 2001 From: NoLogicAlan Date: Wed, 17 Jun 2026 16:20:15 +0300 Subject: [PATCH] some fix /testing --- index.mjs | 14 +++++++------- src/Utils.mjs | 1 + src/worker.mjs | 3 ++- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/index.mjs b/index.mjs index b561f54..1465458 100644 --- a/index.mjs +++ b/index.mjs @@ -409,7 +409,7 @@ export class Remix { } }, ALONE_CHECK_INTERVAL); - this.players.checkVoiceChannels = async function (message) { + this.players.checkVoiceChannels = async (message) => { const userId = message?.author?.id ?? message?.message?.author?.id; const guildId = message?.channel?.guildId ?? @@ -436,20 +436,20 @@ export class Remix { const cId = cleanId(channelId); return { channelId: cId, - alreadyInVoice: self.players.playerMap.has(cId), - hasHumans: self.voiceCache.hasHumansInChannel(cleanGuild, cId), + alreadyInVoice: this.players.playerMap.has(cId), + hasHumans: this.voiceCache.hasHumansInChannel(cleanGuild, cId), }; }; const seedCache = (channelId) => { - if (!self.voiceCache.hasHumanUser(userId, cleanGuild)) { - self.voiceCache.updateUser({ guildId: cleanGuild, userId, channelId, isBot: false }); + if (!this.voiceCache.hasHumanUser(userId, cleanGuild)) { + this.voiceCache.updateUser({ guildId: cleanGuild, userId, channelId, isBot: false }); } }; 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) { logger.voice(`[checkVC] HIT voiceCache → ${observed.channelId}`); return makeResult(observed.channelId); @@ -487,7 +487,7 @@ export class Remix { } catch (e) { logger.voice(`[checkVC] guild error: ${e.message}`); } try { - const loc = self.voiceCache.getHumanUser(userId, cleanGuild); + const loc = this.voiceCache.getHumanUser(userId, cleanGuild); if (loc && loc.channelId) { logger.voice(`[checkVC] HIT voiceCache scan → ${loc.channelId}`); return makeResult(loc.channelId); diff --git a/src/Utils.mjs b/src/Utils.mjs index 3052670..daec0d1 100644 --- a/src/Utils.mjs +++ b/src/Utils.mjs @@ -12,6 +12,7 @@ */ 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. diff --git a/src/worker.mjs b/src/worker.mjs index cb99289..4a31d3e 100644 --- a/src/worker.mjs +++ b/src/worker.mjs @@ -14,7 +14,8 @@ import https from "https"; import { Utils, cleanId } from "./Utils.mjs"; import { PROVIDERS } from "./constants/providers.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_HOST = nl.host ?? "localhost";