From 1f5329edc9a7f5c6412a78d8943b1af2bb2b9fe5 Mon Sep 17 00:00:00 2001 From: Rock Chin <1010553892@qq.com> Date: Mon, 19 Dec 2022 17:25:09 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=AE=8C=E5=96=84=E5=93=8D=E5=BA=94?= =?UTF-8?q?=E6=9C=BA=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config-template.py | 2 +- pkg/qqbot/manager.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config-template.py b/config-template.py index 6505a13e..63eba7b0 100644 --- a/config-template.py +++ b/config-template.py @@ -45,7 +45,7 @@ default_prompt = "如果我之后想获取帮助,请你说“输入!help获取 # 前缀匹配优先级高于正则表达式匹配 # 正则表达式简明教程:https://www.runoob.com/regexp/regexp-tutorial.html response_rules = { - "prefix": ["/ai", "!ai", "!ai", "/chat", "!chat", "!chat"], + "prefix": ["/ai", "!ai", "!ai", "ai"], "regexp": ["为什么.*", "怎么?样.*", "如何.*", "[Hh]ow to.*", "[Ww]hy not.*", "[Ww]hat is.*", ] } diff --git a/pkg/qqbot/manager.py b/pkg/qqbot/manager.py index 84e96596..33752178 100644 --- a/pkg/qqbot/manager.py +++ b/pkg/qqbot/manager.py @@ -318,7 +318,7 @@ class QQBotManager: check, result = check_response_rule(str(event.message_chain).strip()) if check: - reply = process(result) + reply = process(result.strip()) else: # 直接调用 reply = process()