zhenxun_bot/plugins/update_info.py

36 lines
938 B
Python
Raw Normal View History

2021-05-20 19:27:31 +08:00
from nonebot import on_command
from nonebot.adapters.cqhttp import Bot, Event
from nonebot.typing import T_State
2021-07-30 21:21:51 +08:00
from utils.message_builder import image
2021-05-20 19:27:31 +08:00
2021-10-03 14:24:07 +08:00
__zx_plugin_name__ = "更新信息"
__plugin_usage__ = """
usage
更新信息
指令
更新信息
""".strip()
__plugin_des__ = "当前版本的更新信息"
__plugin_cmd__ = ["更新信息"]
__plugin_version__ = 0.1
__plugin_author__ = "HibiKier"
__plugin_settings__ = {
"level": 5,
"default_status": True,
"limit_superuser": False,
"cmd": ["更新信息"],
}
2021-06-15 10:57:08 +08:00
2021-05-20 19:27:31 +08:00
2021-10-03 14:24:07 +08:00
update_info = on_command("更新信息", aliases={"更新日志"}, priority=5, block=True)
2021-05-20 19:27:31 +08:00
@update_info.handle()
async def _(bot: Bot, event: Event, state: T_State):
2021-10-03 14:24:07 +08:00
img = image("update_info.png")
2021-05-20 19:27:31 +08:00
if img:
2021-10-03 14:24:07 +08:00
await update_info.finish(image("update_info.png"))
2021-05-20 19:27:31 +08:00
else:
2021-10-03 14:24:07 +08:00
await update_info.finish("目前没有更新信息哦")