From 6f1ab3201907dcf26d312a3f0d8b26aeda3955f7 Mon Sep 17 00:00:00 2001 From: misyaguziya <53165965+misyaguziya@users.noreply.github.com> Date: Sat, 3 May 2025 15:31:50 +0900 Subject: [PATCH] =?UTF-8?q?[Update]=20Speaker2Chatbox=E3=81=ABword=20filte?= =?UTF-8?q?r=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-python/controller.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src-python/controller.py b/src-python/controller.py index c0f5dabc..cdc1b037 100644 --- a/src-python/controller.py +++ b/src-python/controller.py @@ -321,7 +321,14 @@ class Controller: elif isinstance(message, str) and len(message) > 0: translation = [] transliteration = [] - if model.detectRepeatReceiveMessage(message): + if model.checkKeywords(message): + self.run( + 200, + self.run_mapping["word_filter"], + {"message":f"Detected by word filter: {message}"}, + ) + return + elif model.detectRepeatReceiveMessage(message): return elif config.ENABLE_TRANSLATION is False: pass