1
0
forked from bot/app

feat: 对nb-cli的支持

This commit is contained in:
2024-04-12 13:07:19 +08:00
parent 6a4c88a6ba
commit e2779bdfd7
17 changed files with 127 additions and 40 deletions

View File

@ -0,0 +1,29 @@
from nonebot import require
require("nonebot_plugin_alconna")
from nonebot_plugin_alconna import on_alconna, Alconna, Args, Subcommand, Arparma
status_alc = on_alconna(
aliases={"status"},
command=Alconna(
"status",
Subcommand(
"memory",
alias={"mem", "m", "内存"},
),
Subcommand(
"process",
alias={"proc", "p", "进程"},
)
),
)
@status_alc.assign("memory")
async def _():
print("memory")
@status_alc.assign("process")
async def _():
print("process")