From 9a4200dc5022e1bf5a8b3228fe18251e5255e573 Mon Sep 17 00:00:00 2001 From: Lint Action Date: Thu, 3 Feb 2022 06:58:54 +0000 Subject: =?UTF-8?q?:rotating=5Flight:=20=E8=87=AA=E5=8A=A8=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ATRI/plugins/essential.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'ATRI/plugins/essential.py') diff --git a/ATRI/plugins/essential.py b/ATRI/plugins/essential.py index 6d981aa..e3919d5 100644 --- a/ATRI/plugins/essential.py +++ b/ATRI/plugins/essential.py @@ -24,7 +24,7 @@ from nonebot.adapters.onebot.v11 import ( GroupRecallNoticeEvent, FriendRecallNoticeEvent, MessageSegment, - Message + Message, ) import ATRI @@ -302,7 +302,7 @@ async def _recall_private_event(bot: Bot, event: FriendRecallNoticeEvent): repo = await bot.get_msg(message_id=event.message_id) except BaseException: return - + user = event.user_id repo: dict = repo["message"] @@ -315,6 +315,7 @@ async def _recall_private_event(bot: Bot, event: FriendRecallNoticeEvent): rej_recall = Essential().on_command("拒绝撤回", "拒绝撤回信息", permission=SUPERUSER) + @rej_recall.handle() async def _(): global _acc_recall @@ -324,6 +325,7 @@ async def _(): acc_recall = Essential().on_command("接受撤回", "接受撤回信息", permission=SUPERUSER) + @acc_recall.handle() async def _(): global _acc_recall @@ -349,7 +351,7 @@ def recall_msg_dealer(msg: dict) -> str: if _type == "text": temp_m.append(_data["text"]) elif _type == "image": - url = _data["url"] + url = _data["url"] check = MessageChecker(url).check_image_url if check: temp_m.append(MessageSegment.image(url)) -- cgit v1.2.3