From 8ed8a23c8bf8c62e120f588360d80fbc73b347b2 Mon Sep 17 00:00:00 2001 From: Soulter <37870767+Soulter@users.noreply.github.com> Date: Wed, 3 Jan 2024 16:15:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20gocq=20=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E4=B8=8B=E6=B6=88=E6=81=AF=E5=93=8D=E5=BA=94=E7=9A=84?= =?UTF-8?q?=E4=B8=80=E4=BA=9B=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/platform/qq_gocq.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/model/platform/qq_gocq.py b/model/platform/qq_gocq.py index 01c741d0e..0abab0076 100644 --- a/model/platform/qq_gocq.py +++ b/model/platform/qq_gocq.py @@ -123,10 +123,11 @@ class QQGOCQ(Platform): if message.type == "GroupMessage": if i.qq == message.self_id: resp = True - for i in self.nick_qq: - if i != '' and i in message.message[0].text: - resp = True - break + elif isinstance(i, Plain): + for nick in self.nick_qq: + if nick != '' and message.message[0].text.strip().startwith(nick): + resp = True + break if not resp: return