diff --git a/nonebot/plugin.py b/nonebot/plugin.py index cefe7537..c6584615 100644 --- a/nonebot/plugin.py +++ b/nonebot/plugin.py @@ -143,7 +143,7 @@ def on_endswith(msg: str, startswith(msg), permission, **kwargs) -def on_command(cmd: Union[str, Tuple[str]], +def on_command(cmd: Union[str, Tuple[str, ...]], rule: Optional[Union[Rule, RuleChecker]] = None, permission: Permission = Permission(), **kwargs) -> Type[Matcher]: diff --git a/nonebot/rule.py b/nonebot/rule.py index a846748f..34c1c7b4 100644 --- a/nonebot/rule.py +++ b/nonebot/rule.py @@ -110,7 +110,7 @@ def keyword(msg: str) -> Rule: return Rule(_keyword) -def command(command: Tuple[str]) -> Rule: +def command(command: Tuple[str, ...]) -> Rule: config = get_driver().config command_start = config.command_start command_sep = config.command_sep