doc: 为可扩展组件添加注释

This commit is contained in:
RockChinQ
2024-03-22 16:41:46 +08:00
parent 5f138de75b
commit bd6a32e08e
13 changed files with 147 additions and 7 deletions

View File

@@ -20,6 +20,8 @@ class CommandReturn(pydantic.BaseModel):
image: typing.Optional[mirai.Image]
error: typing.Optional[errors.CommandError]= None
"""错误
"""
class Config:
arbitrary_types_allowed = True
@@ -30,17 +32,40 @@ class ExecuteContext(pydantic.BaseModel):
"""
query: core_entities.Query
"""本次消息的请求对象"""
session: core_entities.Session
"""本次消息所属的会话对象"""
command_text: str
"""命令完整文本"""
command: str
"""命令名称"""
crt_command: str
"""当前命令
多级命令中crt_command为当前命令command为根命令。
例如:!plugin on Webwlkr
处理到plugin时command为plugincrt_command为plugin
处理到on时command为plugincrt_command为on
"""
params: list[str]
"""命令参数
整个命令以空格分割后的参数列表
"""
crt_params: list[str]
"""当前命令参数
多级命令中crt_params为当前命令参数params为根命令参数。
例如:!plugin on Webwlkr
处理到plugin时params为['on', 'Webwlkr']crt_params为['on', 'Webwlkr']
处理到on时params为['on', 'Webwlkr']crt_params为['Webwlkr']
"""
privilege: int
"""发起人权限"""