From 578c9e0695486e3a08690787d0a855aebca26e31 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Thu, 28 Sep 2023 20:51:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=E6=88=B3=E4=B8=80?= =?UTF-8?q?=E6=88=B3=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cores/qqbot/core.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cores/qqbot/core.py b/cores/qqbot/core.py index b568e1322..90b190d8e 100644 --- a/cores/qqbot/core.py +++ b/cores/qqbot/core.py @@ -19,7 +19,8 @@ from nakuru import ( GroupMessage, GroupMemberIncrease, FriendMessage, - GuildMessage + GuildMessage, + Notify ) from nakuru.entities.components import Plain,At,Image from model.provider.provider import Provider @@ -772,7 +773,6 @@ class gocqClient(): # 收到群聊消息 @gocq_app.receiver("GroupMessage") async def _(app: CQHTTP, source: GroupMessage): - # gu.log(str(source), gu.LEVEL_INFO, max_len=9999) if cc.get("gocq_react_group", True): if isinstance(source.message[0], Plain): new_sub_thread(oper_msg, (source, True, None, PLATFORM_GOCQ)) @@ -798,6 +798,12 @@ class gocqClient(): Plain(text = announcement), ]) + @gocq_app.receiver("Notify") + async def _(app: CQHTTP, source: Notify): + print(source) + if source.sub_type == "poke" and source.target_id == source.self_id: + new_sub_thread(oper_msg, (source, False, None, PLATFORM_GOCQ)) + @gocq_app.receiver("GuildMessage") async def _(app: CQHTTP, source: GuildMessage): if cc.get("gocq_react_guild", True):