Feature: 公开自定义 on 函数所需的函数 (#1856)

Co-authored-by: Ju4tCode <42488585+yanyongyu@users.noreply.github.com>
This commit is contained in:
Akirami
2023-03-29 23:09:33 +08:00
committed by GitHub
parent efc4f5a0d5
commit 283560daa7
2 changed files with 28 additions and 7 deletions

View File

@ -1,4 +1,5 @@
import re
from types import ModuleType
from datetime import datetime, timedelta
from typing import Set, List, Type, Tuple, Union, Optional
@ -9,6 +10,11 @@ from nonebot.dependencies import Dependent
from nonebot.rule import Rule, ArgumentParser
from nonebot.typing import T_State, T_Handler, T_RuleChecker, T_PermissionChecker
from .plugin import Plugin
def store_matcher(matcher: Type[Matcher]) -> None: ...
def get_matcher_plugin(depth: int = ...) -> Optional[Plugin]: ...
def get_matcher_module(depth: int = ...) -> Optional[ModuleType]: ...
def on(
type: str = "",
rule: Optional[Union[Rule, T_RuleChecker]] = ...,