From 6f27f597304024837b2ef9d08eb832ed6b11d351 Mon Sep 17 00:00:00 2001 From: Soulter <37870767+Soulter@users.noreply.github.com> Date: Mon, 22 May 2023 18:25:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DGOCQ=E9=A2=91=E9=81=93?= =?UTF-8?q?at=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cores/qqbot/core.py | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/cores/qqbot/core.py b/cores/qqbot/core.py index affa97abe..11def78b7 100644 --- a/cores/qqbot/core.py +++ b/cores/qqbot/core.py @@ -792,13 +792,6 @@ class gocqClient(): # gu.log(str(source), gu.LEVEL_INFO, max_len=9999) if isinstance(source.message[0], Plain): - # if source.message[0].text.startswith(nick_qq): - # # print(nick_qq) - # _len = 0 - # for i in nick_qq: - # if source.message[0].text.startswith(i): - # _len = len(i) - # source.message[0].text = source.message[0].text[_len:].strip() new_sub_thread(oper_msg, (source, True, None, PLATFORM_GOCQ)) if isinstance(source.message[0], At): if source.message[0].qq == source.self_id: @@ -822,14 +815,7 @@ class gocqClient(): @gocq_app.receiver("GuildMessage") async def _(app: CQHTTP, source: GuildMessage): - # gu.log(str(source), gu.LEVEL_INFO, max_len=9999) - # global nick_qq - # if nick_qq == None: - # nick_qq = ("ai","!","!") - # if isinstance(nick_qq, str): - # nick_qq = (nick_qq,) - # if isinstance(nick_qq, list): - # nick_qq = tuple(nick_qq) + gu.log(str(source), gu.LEVEL_INFO, max_len=9999) if isinstance(source.message[0], Plain): # if source.message[0].text.startswith(nick_qq): @@ -840,7 +826,7 @@ class gocqClient(): # source.message[0].text = source.message[0].text[_len:].strip() new_sub_thread(oper_msg, (source, True, None, PLATFORM_GOCQ)) if isinstance(source.message[0], At): - if source.message[0].tiny_id == source.self_tiny_id: + if source.message[0].qq == source.self_tiny_id: new_sub_thread(oper_msg, (source, True, None, PLATFORM_GOCQ)) else: return \ No newline at end of file