From 94a6067a4b9cb3a1c67096132338181cde41fa6c Mon Sep 17 00:00:00 2001 From: eya46 <61458340+eya46@users.noreply.github.com> Date: Thu, 6 Jul 2023 15:18:08 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20Feature:=20=E8=A1=A5=E5=85=85?= =?UTF-8?q?=E5=93=8D=E5=BA=94=E5=99=A8=E7=BB=84=E5=B1=9E=E6=80=A7=20(#2154?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- nonebot/plugin/on.pyi | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/nonebot/plugin/on.pyi b/nonebot/plugin/on.pyi index bb2ea2a6..07aa95be 100644 --- a/nonebot/plugin/on.pyi +++ b/nonebot/plugin/on.pyi @@ -175,7 +175,16 @@ def on_type( state: T_State | None = ..., ) -> type[Matcher]: ... -class CommandGroup: +class _Group: + matchers: list[type[Matcher]] = ... + base_kwargs: dict[str, ...] = ... + def _get_final_kwargs( + self, update: dict[str, ...], *, exclude: set[str, ...] | None = None + ) -> dict[str, ...]: ... + +class CommandGroup(_Group): + basecmd: tuple[str, ...] = ... + prefix_aliases: bool = ... def __init__( self, cmd: str | tuple[str, ...], @@ -221,7 +230,7 @@ class CommandGroup: state: T_State | None = ..., ) -> type[Matcher]: ... -class MatcherGroup: +class MatcherGroup(_Group): def __init__( self, *,