🐛 fix missing param for on event

This commit is contained in:
yanyongyu 2020-10-16 15:12:15 +08:00
parent 0a64959973
commit 1d79ac232f
2 changed files with 5 additions and 3 deletions

View File

@ -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,

View File

@ -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]] = ...,