From 032d840e455d563767589588f57f0f37375edea7 Mon Sep 17 00:00:00 2001 From: HornCopper Date: Thu, 22 Aug 2024 19:04:11 +0800 Subject: [PATCH] =?UTF-8?q?[feat]poke=20=E5=88=A4=E6=96=AD=E8=87=AA?= =?UTF-8?q?=E8=BA=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/grab/poke.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/grab/poke.py b/src/plugins/grab/poke.py index 3381fd10d..e97734804 100644 --- a/src/plugins/grab/poke.py +++ b/src/plugins/grab/poke.py @@ -1,11 +1,13 @@ from nonebot.adapters.onebot.v11 import PokeNotifyEvent, MessageSegment as ms from nonebot import on_notice +from src.tools.config import Config + poke_me = on_notice(priority=5) @poke_me.handle() async def _(event: PokeNotifyEvent): - if event.group_id == None: + if event.group_id == None or event.self_id not in list(Config.bot_basic.notice_to.__dict__): return else: await poke_me.finish("音卡在呢!找音卡有什么事吗!(^ω^)" + ms.image("https://inkar-suki.codethink.cn/Inkar-Suki-Docs/img/emoji.jpg")) \ No newline at end of file