[Update] Speaker2Chatboxにword filterを追加
This commit is contained in:
@@ -321,7 +321,14 @@ class Controller:
|
|||||||
elif isinstance(message, str) and len(message) > 0:
|
elif isinstance(message, str) and len(message) > 0:
|
||||||
translation = []
|
translation = []
|
||||||
transliteration = []
|
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
|
return
|
||||||
elif config.ENABLE_TRANSLATION is False:
|
elif config.ENABLE_TRANSLATION is False:
|
||||||
pass
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user