update matcher

This commit is contained in:
yanyongyu 2020-06-04 14:29:38 +08:00
parent 761d725aed
commit ed404901ca
2 changed files with 4 additions and 2 deletions

1
.gitignore vendored
View File

@ -186,3 +186,4 @@ typings/
.idea
.vscode
dev
doc

View File

@ -88,6 +88,7 @@ class Matcher:
@classmethod
def got(cls,
key: str,
prompt: Optional[str] = None,
args_parser: Optional[Callable[[Event, dict], None]] = None):
def _decorator(func: Handler) -> Handler:
@ -112,11 +113,11 @@ class Matcher:
return _decorator
@classmethod
def finish(cls):
def finish(cls, prompt: Optional[str] = None):
raise FinishedException
@classmethod
def reject(cls):
def reject(cls, prompt: Optional[str] = None):
raise RejectedException
async def run(self, event):