zhenxun_bot/plugins/check/__init__.py
2022-02-19 18:20:19 +08:00

32 lines
720 B
Python
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from nonebot import on_command
from .data_source import Check
from nonebot.rule import to_me
from nonebot.permission import SUPERUSER
from utils.message_builder import image
__zx_plugin_name__ = "服务器自我检查 [Superuser]"
__plugin_usage__ = """
usage
查看服务器当前状态
指令:
自检
"""
__plugin_des__ = "查看服务器当前状态"
__plugin_cmd__ = ["自检/check"]
__plugin_version__ = 0.1
__plugin_author__ = "HibiKier"
check = Check()
check_ = on_command(
"自检", aliases={"check"}, rule=to_me(), permission=SUPERUSER, block=True, priority=1
)
@check_.handle()
async def _():
await check_.send(image(b64=await check.show()))