zhenxun_bot/plugins/update_info.py

26 lines
593 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
__plugin_name__ = '更新信息'
2021-06-15 10:57:08 +08:00
__plugin_usage__ = ''
2021-05-20 19:27:31 +08:00
2021-08-17 23:17:08 +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):
img = image('update_info.png')
if img:
await update_info.finish(image('update_info.png'))
else:
await update_info.finish('目前没有更新信息哦')