Merge branch 'dev-s4u' into dev

This commit is contained in:
SengokuCola
2025-07-01 19:33:06 +08:00
committed by GitHub
12 changed files with 1197 additions and 3 deletions

2
bot.py
View File

@@ -314,6 +314,7 @@ if __name__ == "__main__":
# Schedule tasks returns a future that runs forever.
# We can run console_input_loop concurrently.
main_tasks = loop.create_task(main_system.schedule_tasks())
# 仅在 TTY 中启用 console_input_loop
if sys.stdin.isatty():
logger.info("检测到终端环境,启用控制台输入循环")
@@ -325,6 +326,7 @@ if __name__ == "__main__":
# Wait for all tasks to complete (which they won't, normally)
loop.run_until_complete(main_tasks)
except KeyboardInterrupt:
# loop.run_until_complete(get_global_api().stop())
logger.warning("收到中断信号,正在优雅关闭...")