From fe39e2aba4568ec7cc607588cfca5df45c19dcb0 Mon Sep 17 00:00:00 2001 From: FuQuan <87348379+FuQuan233@users.noreply.github.com> Date: Fri, 7 Nov 2025 12:13:53 +0800 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20fix=20lint=20problems?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nonebot_plugin_llmchat/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nonebot_plugin_llmchat/__init__.py b/nonebot_plugin_llmchat/__init__.py index 32dbd5e..a311dc0 100755 --- a/nonebot_plugin_llmchat/__init__.py +++ b/nonebot_plugin_llmchat/__init__.py @@ -579,7 +579,7 @@ async def handle_preset(event: GroupMessageEvent | PrivateMessageEvent, args: Me return context_id = event.user_id state = private_chat_states[context_id] - + preset_name = args.extract_plain_text().strip() if preset_name == "off": @@ -667,6 +667,7 @@ async def handle_set_prob(event: GroupMessageEvent, args: Message = CommandArg() raise ValueError("概率值必须在0-1之间") except ValueError as e: await set_prob_handler.finish(f"输入有误,请使用 [0,1] 的浮点数\n{e!s}") + return state.random_trigger_prob = prob await set_prob_handler.finish(f"主动回复概率已设为 {prob}")