feat: 被@后等待下文,延迟10秒处理

pull/170/head
XBC_D2O 2025-03-10 23:21:28 +08:00
parent ef561b5cf0
commit e908854384
1 changed files with 7 additions and 0 deletions

View File

@ -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,