mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-02-20 17:46:51 +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]]
|
||||
|
||||
|
||||
def on(rule: Optional[Union[Rule, RuleChecker]] = None,
|
||||
def on(type: str = "",
|
||||
rule: Optional[Union[Rule, RuleChecker]] = None,
|
||||
permission: Optional[Permission] = None,
|
||||
*,
|
||||
handlers: Optional[List[Handler]] = None,
|
||||
@ -35,7 +36,7 @@ def on(rule: Optional[Union[Rule, RuleChecker]] = None,
|
||||
priority: int = 1,
|
||||
block: bool = False,
|
||||
state: Optional[dict] = None) -> Type[Matcher]:
|
||||
matcher = Matcher.new("",
|
||||
matcher = Matcher.new(type,
|
||||
Rule() & rule,
|
||||
permission or Permission(),
|
||||
temp=temp,
|
||||
|
@ -18,7 +18,8 @@ class Plugin(object):
|
||||
matcher: Set[Type[Matcher]]
|
||||
|
||||
|
||||
def on(rule: Optional[Union[Rule, RuleChecker]] = ...,
|
||||
def on(type: str = ...,
|
||||
rule: Optional[Union[Rule, RuleChecker]] = ...,
|
||||
permission: Optional[Permission] = ...,
|
||||
*,
|
||||
handlers: Optional[List[Handler]] = ...,
|
||||
|
Loading…
x
Reference in New Issue
Block a user