mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-29 09:10:22 +00:00
Use stub file to keep class CommandGroup
clean
This commit is contained in:
24
nonebot/command/group.pyi
Normal file
24
nonebot/command/group.pyi
Normal file
@ -0,0 +1,24 @@
|
||||
from typing import Union, Callable, Iterable
|
||||
|
||||
from nonebot.typing import CommandName_T
|
||||
|
||||
|
||||
class CommandGroup:
|
||||
"""
|
||||
Group a set of commands with same name prefix.
|
||||
"""
|
||||
|
||||
__slots__ = ('basename', 'base_kwargs')
|
||||
|
||||
def __init__(self, name: Union[str, CommandName_T], *,
|
||||
permission: int = ...,
|
||||
only_to_me: bool = ...,
|
||||
privileged: bool = ...,
|
||||
shell_like: bool = ...): ...
|
||||
|
||||
def command(self, name: Union[str, CommandName_T], *,
|
||||
aliases: Iterable[str] = ...,
|
||||
permission: int = ...,
|
||||
only_to_me: bool = ...,
|
||||
privileged: bool = ...,
|
||||
shell_like: bool = ...) -> Callable: ...
|
Reference in New Issue
Block a user