mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-02-21 18:15:50 +08:00
🐛 fix missing param for on event
This commit is contained in:
parent
0a64959973
commit
1d79ac232f
@ -27,7 +27,8 @@ class Plugin(object):
|
|||||||
matcher: Set[Type[Matcher]]
|
matcher: Set[Type[Matcher]]
|
||||||
|
|
||||||
|
|
||||||
def on(rule: Optional[Union[Rule, RuleChecker]] = None,
|
def on(type: str = "",
|
||||||
|
rule: Optional[Union[Rule, RuleChecker]] = None,
|
||||||
permission: Optional[Permission] = None,
|
permission: Optional[Permission] = None,
|
||||||
*,
|
*,
|
||||||
handlers: Optional[List[Handler]] = None,
|
handlers: Optional[List[Handler]] = None,
|
||||||
@ -35,7 +36,7 @@ def on(rule: Optional[Union[Rule, RuleChecker]] = None,
|
|||||||
priority: int = 1,
|
priority: int = 1,
|
||||||
block: bool = False,
|
block: bool = False,
|
||||||
state: Optional[dict] = None) -> Type[Matcher]:
|
state: Optional[dict] = None) -> Type[Matcher]:
|
||||||
matcher = Matcher.new("",
|
matcher = Matcher.new(type,
|
||||||
Rule() & rule,
|
Rule() & rule,
|
||||||
permission or Permission(),
|
permission or Permission(),
|
||||||
temp=temp,
|
temp=temp,
|
||||||
|
@ -18,7 +18,8 @@ class Plugin(object):
|
|||||||
matcher: Set[Type[Matcher]]
|
matcher: Set[Type[Matcher]]
|
||||||
|
|
||||||
|
|
||||||
def on(rule: Optional[Union[Rule, RuleChecker]] = ...,
|
def on(type: str = ...,
|
||||||
|
rule: Optional[Union[Rule, RuleChecker]] = ...,
|
||||||
permission: Optional[Permission] = ...,
|
permission: Optional[Permission] = ...,
|
||||||
*,
|
*,
|
||||||
handlers: Optional[List[Handler]] = ...,
|
handlers: Optional[List[Handler]] = ...,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user