mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
✨ 添加重启系统限制
This commit is contained in:
parent
82a3527e2e
commit
9935e981f0
@ -1,6 +1,7 @@
|
||||
import asyncio
|
||||
import os
|
||||
from pathlib import Path
|
||||
import platform
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
@ -89,6 +90,8 @@ async def run_restart_command(bat_path: Path, port: int):
|
||||
description="重启",
|
||||
)
|
||||
async def _() -> Result:
|
||||
if platform.system() != "Windows":
|
||||
return Result.fail("自动重启仅支持Windows系统,请尝试手动重启")
|
||||
flag_file = None
|
||||
for file in os.listdir(Path()):
|
||||
if file.startswith(FILE_NAME):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user