feat: 国产某聊天软件的图床支持

This commit is contained in:
远野千束 2024-04-03 14:59:00 +08:00
parent ad543dd738
commit eaae8ceaad

View File

@ -1,6 +1,7 @@
import base64 import base64
from typing import Any from typing import Any
import nonebot
import pip import pip
from git import Repo from git import Repo
from nonebot import Bot, require, get_driver from nonebot import Bot, require, get_driver
@ -104,8 +105,7 @@ async def _(bot: T_Bot, event: T_MessageEvent):
repo.remotes[origin].pull() repo.remotes[origin].pull()
break break
except Exception as e: except Exception as e:
print(f"Pull from {origin} failed: {e}") nonebot.logger.error(f"Pull from {origin} failed: {e}")
logs = repo.index
reply = "Liteyuki updated!\n" reply = "Liteyuki updated!\n"
reply += f"```\n{logs}\n```\n" reply += f"```\n{logs}\n```\n"
btn_restart = md.button(ulang.get("liteyuki.restart_now"), "reload-liteyuki") btn_restart = md.button(ulang.get("liteyuki.restart_now"), "reload-liteyuki")