From e9088543843234ac46e228890b94caa17790ae14 Mon Sep 17 00:00:00 2001 From: XBC_D2O Date: Mon, 10 Mar 2025 23:21:28 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=A2=AB@=E5=90=8E=E7=AD=89=E5=BE=85?= =?UTF-8?q?=E4=B8=8B=E6=96=87=EF=BC=8C=E5=BB=B6=E8=BF=9F10=E7=A7=92?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/chat/bot.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/plugins/chat/bot.py b/src/plugins/chat/bot.py index c510fe4b..34ad7ad2 100644 --- a/src/plugins/chat/bot.py +++ b/src/plugins/chat/bot.py @@ -1,5 +1,6 @@ import time from random import random +import asyncio from loguru import logger from nonebot.adapters.onebot.v11 import Bot, GroupMessageEvent @@ -88,6 +89,12 @@ class ChatBot: await self.storage.store_message(message, topic[0] if topic else None) is_mentioned = is_mentioned_bot_in_txt(message.processed_plain_text) + + if is_mentioned: + #如果被@等待下文10秒 + await asyncio.sleep(10) + logger.info(f"被@,等待下文") + reply_probability = willing_manager.change_reply_willing_received( event.group_id, topic[0] if topic else None,