From a91c8456830324d126f7a8713ab4b729145a9d86 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Sun, 15 Jun 2025 01:54:51 +0900 Subject: [PATCH] . --- controller.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/controller.js b/controller.js index b411225..fd7ec2b 100644 --- a/controller.js +++ b/controller.js @@ -37,6 +37,8 @@ class LibreTranslateAPI { return result; } + this.logger.info(`${detection.confidence} ${detection.confidence}`) + if (detection.confidence > MIN_CONFIDENCE_SCORE) { for (const targetLang of targetLanguages) { if (!((detection.language === 'zh-Hans' || detection.language === 'zh-Hant') && (targetLang === 'zh-Hans' || targetLang === 'zh-Hant')) && detection.language !== targetLang && this.allowedLanguages.includes(detection.language) && this.allowedLanguages.includes(targetLang)) { @@ -142,8 +144,8 @@ class ControllerPlugin extends BaseControllerPlugin { await this.sendMessage(request, `**\`${nrc_username}\`**: ${nrc_message}`) if (this.controller.config.get('ClusterChatSync.use_libretranslate')) { + this.logger.info(`${this.translator_language}`) const result = await this.translator.translate(nrc_message, this.translator_language); - this.logger.info(result); if (result && result.action) { await this.sendMessage(request, `**\`${nrc_username}\`**: ${result.passage}`)