From 8e564f5f57f9f0114ca6dd1763728b1fb797295c Mon Sep 17 00:00:00 2001 From: Decrabbit Date: Fri, 9 Aug 2024 19:06:31 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A9=E7=B1=BB=E5=9E=8B=E5=A5=BD=E7=9C=8B?= =?UTF-8?q?=E7=82=B9qw?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/nonebot_plugin_alconna/uniseg/adapters/qq/exporter.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nonebot_plugin_alconna/uniseg/adapters/qq/exporter.py b/src/nonebot_plugin_alconna/uniseg/adapters/qq/exporter.py index afcdc60..5811356 100644 --- a/src/nonebot_plugin_alconna/uniseg/adapters/qq/exporter.py +++ b/src/nonebot_plugin_alconna/uniseg/adapters/qq/exporter.py @@ -377,7 +377,7 @@ async def send_to(self, target: Union[Target, Event], bot: Bot, message: Message # 私信需要使用 post_dms_messages # https://bot.q.qq.com/wiki/develop/api/openapi/dms/post_dms_messages.html#%E5%8F%91%E9%80%81%E7%A7%81%E4%BF%A1 return await bot.send_to_dms( - guild_id=dms.guild_id, + guild_id=dms.guild_id, # type: ignore message=message, msg_id=target.source, **kwargs, # type: ignore @@ -429,7 +429,7 @@ async def recall(self, mid: Any, bot: Bot, context: Union[Target, Event]): group_openid=context.id, message_id=mid.id, # type: ignore ) - else: + elif isinstance(context, GroupAtMessageCreateEvent): await bot.delete_group_message( group_openid=context.group_openid, message_id=mid.id, # type: ignore @@ -441,7 +441,7 @@ async def recall(self, mid: Any, bot: Bot, context: Union[Target, Event]): openid=context.id, message_id=mid.id, # type: ignore ) - else: + elif isinstance(context, C2CMessageCreateEvent): await bot.delete_c2c_message( openid=context.author.id, message_id=mid.id, # type: ignore