♻️ code format

This commit is contained in:
FuQuan233 2025-02-28 11:21:15 +08:00
parent 6db55055a2
commit e8db066647

View file

@ -285,7 +285,9 @@ async def process_messages(group_id: int):
),
)
except Exception as e:
await handler.send(f"合并转发消息发送失败:\n{e!s}\n"+reasoning_content)
await handler.send(
f"合并转发消息发送失败:\n{e!s}\n" + reasoning_content
)
assert reply is not None
logger.info(
@ -369,6 +371,7 @@ async def handle_reset(event: GroupMessageEvent, args: Message = CommandArg()):
group_states[group_id].history.clear()
await reset_handler.finish("记忆已清空")
set_prob_handler = on_command(
"设置主动回复概率",
priority=99,
@ -457,7 +460,10 @@ async def load_state():
state.last_active = state_data["last_active"]
state.group_prompt = state_data["group_prompt"]
state.output_reasoning_content = state_data["output_reasoning_content"]
state.random_trigger_prob = (state_data.get("random_trigger_prob") or plugin_config.random_trigger_prob)
state.random_trigger_prob = (
state_data.get("random_trigger_prob")
or plugin_config.random_trigger_prob
)
group_states[int(gid)] = state