From e1019ade3c16d91774ff37665d3595afee35f12d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AB=E5=88=86=E6=A9=98=E5=AD=90?= Date: Tue, 11 Mar 2025 18:52:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E6=8B=BC=E5=86=99=E9=94=99=E8=AF=AF=E5=B9=B6=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=8F=AF=E8=AF=BB=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/chat/bot.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/plugins/chat/bot.py b/src/plugins/chat/bot.py index 9b39a9be6..a3bab2f53 100644 --- a/src/plugins/chat/bot.py +++ b/src/plugins/chat/bot.py @@ -153,8 +153,8 @@ class ChatBot: bot_user_info = UserInfo( user_id=global_config.BOT_QQ, user_nickname=global_config.BOT_NICKNAME, platform=messageinfo.platform ) - tinking_time_point = round(time.time(), 2) - think_id = "mt" + str(tinking_time_point) + thinking_time_point = round(time.time(), 2) + think_id = "mt" + str(thinking_time_point) thinking_message = MessageThinking( message_id=think_id, chat_stream=chat, bot_user_info=bot_user_info, reply=message ) @@ -197,7 +197,7 @@ class ChatBot: typing_time = calculate_typing_time(msg) print(f"typing_time: {typing_time}") accu_typing_time += typing_time - timepoint = tinking_time_point + accu_typing_time + timepoint = thinking_time_point + accu_typing_time message_segment = Seg(type="text", data=msg) print(f"message_segment: {message_segment}") bot_message = MessageSending( @@ -220,7 +220,7 @@ class ChatBot: print(f"添加message_set到message_manager") message_manager.add_message(message_set) - bot_response_time = tinking_time_point + bot_response_time = thinking_time_point if random() < global_config.emoji_chance: emoji_raw = await emoji_manager.get_emoji_for_text(response) @@ -232,7 +232,7 @@ class ChatBot: emoji_cq = image_path_to_base64(emoji_path) if random() < 0.5: - bot_response_time = tinking_time_point - 1 + bot_response_time = thinking_time_point - 1 else: bot_response_time = bot_response_time + 1