mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-16 19:11:00 +00:00
💡 update command docstrinrg
This commit is contained in:
@ -200,6 +200,8 @@ def command(*cmds: Union[str, Tuple[str, ...]]) -> Rule:
|
||||
"""
|
||||
:说明:
|
||||
命令形式匹配,根据配置里提供的 ``command_start``, ``command_sep`` 判断消息是否为命令。
|
||||
|
||||
可以通过 ``state["_prefix"]["command"]`` 获取匹配成功的命令(例:``("test",)``),通过 ``state["_prefix"]["raw_command"]`` 获取匹配成功的原始命令文本(例:``"/test"``)。
|
||||
:参数:
|
||||
* ``*cmds: Union[str, Tuple[str, ...]]``: 命令内容
|
||||
:示例:
|
||||
|
Reference in New Issue
Block a user