A Fast Command Analyser based on Dict and Pydantic
Alconna
隶属于ArcletProject
, 在Cesloi
内有内置
Alconna
是 Cesloi-CommandAnalysis
的高级版,支持解析消息链
一般情况下请当作简易的消息链解析器/命令解析器
文档
Example
from arclet.alconna import Alconna
from arclet.alconna.component import Option, Subcommand
from arclet.alconna.types import AnyStr
cmd = Alconna(
command="/pip",
options=[
Subcommand("install", Option("--upgrade"), pak_name=AnyStr)
Option("list"),
]
)
msg =