Skip to content

Commit

Permalink
[#]尝试修复自动更新bug
Browse files Browse the repository at this point in the history
  • Loading branch information
benx1n committed Aug 29, 2023
1 parent 1ba239f commit 8725d5a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/plugins/hikari_bot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,9 @@ async def update_Hikari(ev: MessageEvent, bot: Bot):
# *[download(each["url"], f"{driver.config.nb2_path}\{each['name']}") for each in nb2_file]
# )
logger.info(f'当前解释器路径{sys.executable}')
os.system(f'{sys.executable} -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade hikari-bot hikari-core --user')
os.system(f'{sys.executable} -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade nonebot-plugin-gocqhttp --user')
os.system(f'{sys.executable} -m pip install hikari-bot -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade --user')
os.system(f'{sys.executable} -m pip install hikari-core -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade --user')
os.system(f'{sys.executable} -m pip install nonebot-plugin-gocqhttp -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade --user')
Reloader.reload(delay=1)
except RuntimeError:
if str(platform.system()).lower() == 'linux':
Expand Down
2 changes: 1 addition & 1 deletion 更新(一键包不用点).bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set PATH=%~dp0pyenv\Library\bin;%~dp0pyenv;%PATH%

echo Try to upgrade the latest hikari-bot
cd /d %~dp0
python -m pip install --upgrade hikari-bot
python -m pip install --upgrade hikari-bot hikari-core
git pull
echo.
pause

0 comments on commit 8725d5a

Please sign in to comment.