From ba4fc26ea70069b8cdf6e0e310ed18edab8bc9c7 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sun, 25 Oct 2020 19:21:17 +0200 Subject: [PATCH] Maybe improve help stuff --- maubot/handlers/command.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/maubot/handlers/command.py b/maubot/handlers/command.py index 66790ed..33deb01 100644 --- a/maubot/handlers/command.py +++ b/maubot/handlers/command.py @@ -147,6 +147,8 @@ class CommandHandler: @property def __mb_full_help__(self) -> str: usage = self.__mb_usage_without_subcommands__ + "\n\n" + if not self.__mb_require_subcommand__: + usage += f"* {self.__mb_prefix__} {self.__mb_usage_args__} - {self.__mb_help__}\n" usage += "\n".join(cmd.__mb_usage_inline__ for cmd in self.__mb_subcommands__) return usage @@ -188,7 +190,7 @@ class CommandHandler: def __mb_usage_without_subcommands__(self) -> str: if not self.__mb_arg_fallthrough__: return (f"**Usage:** {self.__mb_prefix__} {self.__mb_usage_args__}" - f" _OR_ {self.__mb_usage_subcommand__}") + f" _OR_ {self.__mb_prefix__} {self.__mb_usage_subcommand__}") return f"**Usage:** {self.__mb_prefix__} {self.__mb_usage_args__}" @property