diff --git a/zhenxun/builtin_plugins/withdraw.py b/zhenxun/builtin_plugins/withdraw.py index 8186cfbc..81056e2c 100644 --- a/zhenxun/builtin_plugins/withdraw.py +++ b/zhenxun/builtin_plugins/withdraw.py @@ -46,10 +46,13 @@ _matcher = on_alconna(Alconna("撤回"), priority=5, block=True, rule=reply_chec @_matcher.handle() async def _(bot: Bot, event: Event, session: Uninfo, arparma: Arparma): if reply := await reply_fetch(event, bot): - if ( - MessageManager.check(session.user.id, reply.id) - or session.user.id in bot.config.superusers - ): + if session.user.id in bot.config.superusers: + try: + await bot.delete_msg(message_id=reply.id) + logger.info("撤回消息", arparma.header_result, session=session) + except Exception: + await MessageUtils.build_message("撤回失败,可能消息已过期...").send() + elif MessageManager.check(session.user.id, reply.id): try: await bot.delete_msg(message_id=reply.id) logger.info("撤回消息", arparma.header_result, session=session)