2021-05-20 19:21:05 +08:00
|
|
|
|
from nonebot import on_command
|
|
|
|
|
|
from .data_source import Check
|
|
|
|
|
|
from nonebot.rule import to_me
|
|
|
|
|
|
from nonebot.permission import SUPERUSER
|
2021-11-04 16:11:50 +08:00
|
|
|
|
from utils.message_builder import image
|
2021-05-20 19:21:05 +08:00
|
|
|
|
|
|
|
|
|
|
|
2021-10-03 14:24:07 +08:00
|
|
|
|
__zx_plugin_name__ = "服务器自我检查 [Superuser]"
|
|
|
|
|
|
__plugin_usage__ = """
|
|
|
|
|
|
usage:
|
|
|
|
|
|
查看服务器当前状态
|
|
|
|
|
|
指令:
|
|
|
|
|
|
自检
|
|
|
|
|
|
"""
|
|
|
|
|
|
__plugin_des__ = "查看服务器当前状态"
|
|
|
|
|
|
__plugin_cmd__ = ["自检/check"]
|
|
|
|
|
|
__plugin_version__ = 0.1
|
|
|
|
|
|
__plugin_author__ = "HibiKier"
|
2021-06-15 10:57:08 +08:00
|
|
|
|
|
2021-05-20 19:21:05 +08:00
|
|
|
|
|
|
|
|
|
|
check = Check()
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-07-30 21:21:51 +08:00
|
|
|
|
check_ = on_command(
|
|
|
|
|
|
"自检", aliases={"check"}, rule=to_me(), permission=SUPERUSER, block=True, priority=1
|
|
|
|
|
|
)
|
2021-05-20 19:21:05 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@check_.handle()
|
2022-02-19 18:20:19 +08:00
|
|
|
|
async def _():
|
2021-11-04 16:11:50 +08:00
|
|
|
|
await check_.send(image(b64=await check.show()))
|