fix(群赛马): 降低测试命令优先级并添加确认消息

将测试模拟赛马命令的优先级从5调整为1,以避免与正式命令冲突。
在执行测试模拟前发送确认消息,明确告知用户此为无副作用的完全模拟。
This commit is contained in:
2026-04-04 21:30:55 +08:00
parent 699b57d1ea
commit e22b44ff07

View File

@@ -133,7 +133,7 @@ def _generate_random_horse_names(count: int) -> list[str]:
return list(names)[:count]
test_simulate_race_cmd = on_command("测试模拟赛马", aliases={"测试模拟"}, priority=5, block=True)
test_simulate_race_cmd = on_command("测试模拟赛马", aliases={"测试模拟"}, priority=1, block=True)
class _FakeBot:
@@ -201,6 +201,8 @@ async def handle_test_simulate_race(bot: Bot, event: Event):
await test_simulate_race_cmd.finish("权限不足")
return
await test_simulate_race_cmd.send("收到:测试模拟赛马,开始执行完全模拟(无真实积分/数据库副作用)")
scope = get_scope(event)
lock = room_store.get_lock(scope)