From a22356b6284d4ae5b44da5d49000f8f0c4af56ba Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 9 Aug 2024 08:58:36 +0000 Subject: [PATCH] :rotating_light: auto fix by pre-commit hooks --- .../uniseg/adapters/qq/exporter.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/nonebot_plugin_alconna/uniseg/adapters/qq/exporter.py b/src/nonebot_plugin_alconna/uniseg/adapters/qq/exporter.py index 55e364a..41e6f11 100644 --- a/src/nonebot_plugin_alconna/uniseg/adapters/qq/exporter.py +++ b/src/nonebot_plugin_alconna/uniseg/adapters/qq/exporter.py @@ -1,6 +1,5 @@ from pathlib import Path from dataclasses import dataclass -from nonebot.adapters.qq.models import PostC2CMessagesReturn, PostGroupMessagesReturn, QQMessage from typing_extensions import override from typing import TYPE_CHECKING, Any, Union @@ -11,6 +10,7 @@ from nonebot.adapters.qq.message import Message, MessageSegment from nonebot.adapters.qq.models.common import Button as ButtonModel from nonebot.adapters.qq.models.guild import Message as GuildMessage +from nonebot.adapters.qq.models import PostC2CMessagesReturn, PostGroupMessagesReturn from nonebot.adapters.qq.models.common import Permission, RenderData, InlineKeyboard, MessageKeyboard, InlineKeyboardRow from nonebot.adapters.qq.event import ( ForumEvent, @@ -422,20 +422,19 @@ async def recall(self, mid: Any, bot: Bot, context: Union[Target, Event]): message_id=mid.id, ) elif isinstance(context, GroupAtMessageCreateEvent): - if isinstance(mid,PostGroupMessagesReturn): - + if isinstance(mid, PostGroupMessagesReturn): + await bot.delete_group_message( group_openid=context.group_openid, - message_id=mid.id,#type: ignore + message_id=mid.id, # type: ignore ) elif isinstance(context, C2CMessageCreateEvent): if isinstance(mid, PostC2CMessagesReturn): await bot.delete_c2c_message( openid=context.author.id, - message_id=mid.id,#type: ignore + message_id=mid.id, # type: ignore ) - - + return def get_reply(self, mid: Any):