mirror of
https://github.com/TriM-Organization/LiteyukiBot-TriM.git
synced 2024-11-25 08:35:03 +08:00
30 lines
568 B
Python
30 lines
568 B
Python
|
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")
|