From 02ad7f5eb7b739532433cdbc006de03abc3fcbec Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Sat, 14 Jun 2025 01:51:36 +0900 Subject: [PATCH] . --- controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controller.js b/controller.js index 5db7882..eb56771 100644 --- a/controller.js +++ b/controller.js @@ -82,7 +82,7 @@ class ControllerPlugin extends BaseControllerPlugin { if (this.controller.config.get('chat_sync.use_libretranslate')) { this.translator = new LibreTranslateAPI(this.controller.config.get('chat_sync.libretranslate_url'), this.controller.config.get('chat_sync.libretranslate_key')); - await translator.init(); + await this.translator.init(); this.translator_language = this.controller.config.get('chat_sync.libretranslate_language').trim().split(/\s+/); } @@ -181,7 +181,7 @@ class ControllerPlugin extends BaseControllerPlugin { const nrc_message = nrc.substring(nrc_index + 1).trim(); if (this.controller.config.get('chat_sync.use_libretranslate')) { - const result = await translator.translate(nrc_message, this.translator_language); + const result = await this.translator.translate(nrc_message, this.translator_language); this.sendChat(`[color=255,255,255]\`${nrc_username}\`: ${result}[/color]`); // await sendMessage(`**\`${nrc_username}\`**: ${result}`)