From aac1f267d7fc015ca5ecdf3f049bf56d72cd19a1 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Wed, 25 Mar 2020 21:26:17 +0200 Subject: [PATCH] Fix exception when running subcommand without enough arguments --- maubot/handlers/command.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/maubot/handlers/command.py b/maubot/handlers/command.py index 6687bf9..4b11f47 100644 --- a/maubot/handlers/command.py +++ b/maubot/handlers/command.py @@ -164,7 +164,8 @@ class CommandHandler: @property def __mb_prefix__(self) -> str: if self.__mb_parent__: - return f"{self.__mb_parent__.__mb_prefix__} {self.__mb_name__}" + return (f"!{self.__mb_parent__.__mb_get_name__(self.__bound_instance__)} " + f"{self.__mb_name__}") return f"!{self.__mb_name__}" @property