zhenxun_bot/plugins/check/__init__.py
2021-10-03 14:24:07 +08:00

33 lines
790 B
Python
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.adapters.cqhttp import Bot, Event
from nonebot.typing import T_State
from nonebot.rule import to_me
from nonebot.permission import SUPERUSER
__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 _(bot: Bot, event: Event, state: T_State):
await check_.send(await check.show())