mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 06:12:53 +08:00
Update __init__.py
This commit is contained in:
parent
55bfa8f669
commit
80c49a7cf5
@ -5,7 +5,7 @@ from .data_source import check_update, get_latest_version_data
|
||||
from services.log import logger
|
||||
from utils.utils import scheduler, get_bot
|
||||
from pathlib import Path
|
||||
from configs.config import Config
|
||||
from configs.config import NICKNAME, Config
|
||||
from nonebot.rule import to_me
|
||||
from nonebot.params import ArgStr
|
||||
import platform
|
||||
@ -72,10 +72,10 @@ async def _(bot: Bot):
|
||||
|
||||
|
||||
|
||||
@restart.got("flag", prompt="确定是否重启真寻?确定请回复[是|好|确定](重启失败咱们将失去联系,请谨慎!)")
|
||||
@restart.got("flag", prompt=f"确定是否重启{NICKNAME}?确定请回复[是|好|确定](重启失败咱们将失去联系,请谨慎!)")
|
||||
async def _(flag: str = ArgStr("flag")):
|
||||
if flag.lower() in ["true", "是", "好", "确定", "确定是"]:
|
||||
await restart.send("开始重启真寻..请稍等...")
|
||||
await restart.send(f"开始重启{NICKNAME}..请稍等...")
|
||||
open("is_restart", "w")
|
||||
if str(platform.system()).lower() == "windows":
|
||||
import sys
|
||||
@ -126,5 +126,5 @@ async def _():
|
||||
if code == 200:
|
||||
await bot.send_private_msg(
|
||||
user_id=int(list(bot.config.superusers)[0]),
|
||||
message=f"更新完毕,请重启真寻....",
|
||||
message=f"更新完毕,请重启{NICKNAME}....",
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user