From ed404901cae13c6f2d895af54173c3eda10131c7 Mon Sep 17 00:00:00 2001 From: yanyongyu Date: Thu, 4 Jun 2020 14:29:38 +0800 Subject: [PATCH] update matcher --- .gitignore | 1 + nonebot/matcher.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index ce338cb9..106c2416 100644 --- a/.gitignore +++ b/.gitignore @@ -186,3 +186,4 @@ typings/ .idea .vscode dev +doc diff --git a/nonebot/matcher.py b/nonebot/matcher.py index dada2f59..2e66ba91 100644 --- a/nonebot/matcher.py +++ b/nonebot/matcher.py @@ -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):