From 16f6c82c09efcdf1b56c8eb8d12a9f4d83e2b185 Mon Sep 17 00:00:00 2001 From: liuwei Date: Mon, 17 Feb 2025 16:27:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AA=E5=A4=84=E7=90=86=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E4=B8=BA1=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=8C=E5=BC=95?= =?UTF-8?q?=E7=94=A8@=E4=B8=8D=E4=BA=88=E4=BB=A5=E5=AF=B9=E8=AF=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- robot.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/robot.py b/robot.py index 70de083..2aa5b13 100644 --- a/robot.py +++ b/robot.py @@ -159,8 +159,10 @@ class Robot(Job): self.sendTextMsg("群AI功能未开启", msg.roomid, msg.sender) return True else: - rsp = self.chat.get_answer(q, (msg.roomid if msg.from_group() else msg.sender)) - + if msg.type == 1: # 只处理类型为1的消息提供的问题,引用@不予以对话 + rsp = self.chat.get_answer(q, (msg.roomid if msg.from_group() else msg.sender)) + else: + return True if rsp: if msg.from_group(): self.sendTextMsg(rsp, msg.roomid, msg.sender)