From fbd60e30fc6c078c3669feaa4a234126af486790 Mon Sep 17 00:00:00 2001 From: StarHeartHunt Date: Fri, 9 Jul 2021 16:09:01 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20remove=20check=5Freply?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nonebot/adapters/feishu/bot.py | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/packages/nonebot-adapter-feishu/nonebot/adapters/feishu/bot.py b/packages/nonebot-adapter-feishu/nonebot/adapters/feishu/bot.py index b08ce65a..9045dbc2 100644 --- a/packages/nonebot-adapter-feishu/nonebot/adapters/feishu/bot.py +++ b/packages/nonebot-adapter-feishu/nonebot/adapters/feishu/bot.py @@ -22,28 +22,6 @@ if TYPE_CHECKING: from nonebot.config import Config -async def _check_reply(bot: "Bot", event: "Event"): - """ - :说明: - - 检查是否回复bot消息,赋值 ``event.reply``, ``event.to_me`` - - :参数: - - * ``bot: Bot``: Bot 对象 - * ``event: Event``: Event 对象 - """ - if not isinstance(event, MessageEvent): - return - if event.event.message.parent_id: - ret = await bot.call_api( - f"im/v1/messages/{event.event.message.parent_id}", method="GET") - event.reply = Reply.parse_obj(ret["items"][0]) - if event.reply.sender.sender_type == "app": - event.to_me = True - return - - def _check_at_me(bot: "Bot", event: "Event"): """ :说明: @@ -245,7 +223,6 @@ class Bot(BaseBot): event = Event.parse_obj(data) _check_at_me(self, event) - await _check_reply(self, event) _check_nickname(self, event) await handle_event(self, event)