Beispiel #1
0
def RawCommand() -> str:
    """消息命令文本"""
    return Depends(_raw_command)
Beispiel #2
0
def CommandArg() -> Any:
    """消息命令参数"""
    return Depends(_command_arg)
Beispiel #3
0
def EventToMe() -> bool:
    """{ref}`nonebot.adapters.Event` `to_me` 参数"""
    return Depends(_event_to_me)
Beispiel #4
0
def Command() -> Tuple[str, ...]:
    """消息命令元组"""
    return Depends(_command)
Beispiel #5
0
def EventMessage() -> Any:
    """{ref}`nonebot.adapters.Event` 消息参数"""
    return Depends(_event_message)
Beispiel #6
0
def EventPlainText() -> str:
    """{ref}`nonebot.adapters.Event` 纯文本消息参数"""
    return Depends(_event_plain_text)
Beispiel #7
0
def LastReceived(default: Any = None) -> Any:
    """`last_receive` 事件参数"""
    def _last_received(matcher: "Matcher") -> Any:
        return matcher.get_last_receive(default)

    return Depends(_last_received, use_cache=False)
Beispiel #8
0
def EventType() -> str:
    """{ref}`nonebot.adapters.Event` 类型参数"""
    return Depends(_event_type)
Beispiel #9
0
def RegexDict() -> Dict[str, Any]:
    """正则匹配结果 group 字典"""
    return Depends(_regex_dict, use_cache=False)
Beispiel #10
0
def Received(id: Optional[str] = None, default: Any = None) -> Any:
    """`receive` 事件参数"""
    def _received(matcher: "Matcher"):
        return matcher.get_receive(id or "", default)

    return Depends(_received, use_cache=False)
Beispiel #11
0
def RegexGroup() -> Tuple[Any, ...]:
    """正则匹配结果 group 元组"""
    return Depends(_regex_group, use_cache=False)
Beispiel #12
0
def RegexMatched() -> str:
    """正则匹配结果"""
    return Depends(_regex_matched, use_cache=False)
Beispiel #13
0
def ShellCommandArgv() -> Any:
    """shell 命令原始参数列表"""
    return Depends(_shell_command_argv, use_cache=False)
Beispiel #14
0
def ShellCommandArgs():
    """shell 命令解析后的参数字典"""
    return Depends(_shell_command_args, use_cache=False)
Beispiel #15
0
def CommandStart() -> str:
    """消息命令开头"""
    return Depends(_command_start)