From 57cde4de24433770a7417a326c1ee7aab18b5dfb Mon Sep 17 00:00:00 2001 From: SengokuCola <1026294844@qq.com> Date: Tue, 4 Mar 2025 23:32:01 +0800 Subject: [PATCH] Update willing_manager.py 1 --- src/plugins/chat/willing_manager.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/plugins/chat/willing_manager.py b/src/plugins/chat/willing_manager.py index 5266142c7..0c4a76316 100644 --- a/src/plugins/chat/willing_manager.py +++ b/src/plugins/chat/willing_manager.py @@ -11,7 +11,6 @@ class WillingManager: while True: await asyncio.sleep(3) for group_id in self.group_reply_willing: - # 每分钟衰减10%的回复意愿 self.group_reply_willing[group_id] = max(0, self.group_reply_willing[group_id] * 0.6) def get_willing(self, group_id: int) -> float: @@ -26,13 +25,7 @@ class WillingManager: """改变指定群组的回复意愿并返回回复概率""" current_willing = self.group_reply_willing.get(group_id, 0) - print(f"初始意愿: {current_willing}") - - # if topic and current_willing < 1: - # current_willing += 0.2 - # elif topic: - # current_willing += 0.05 - + # print(f"初始意愿: {current_willing}") if is_mentioned_bot and current_willing < 1.0: current_willing += 0.9 print(f"被提及, 当前意愿: {current_willing}") @@ -57,11 +50,10 @@ class WillingManager: if group_id in config.talk_frequency_down_groups: reply_probability = reply_probability / 3.5 - - # if is_mentioned_bot and user_id == int(1026294844): - # reply_probability = 1 reply_probability = min(reply_probability, 1) + if reply_probability < 0.1: + reply_probability = 0.1 return reply_probability def change_reply_willing_sent(self, group_id: int):