diff --git a/src/cmd/builtin.py b/src/cmd/builtin.py index aa065543..6b12ce85 100644 --- a/src/cmd/builtin.py +++ b/src/cmd/builtin.py @@ -160,7 +160,6 @@ async def _help(self, cmd_line: List[str], execution_ctx: ExecutionContext) -> N def get_help_for_command(cmd_name: str) -> str: if cmd_name not in bc.executor.commands.keys(): - result = f"Unknown command '{cmd_name}'" return cmd = bc.executor.commands[cmd_name] result = "" @@ -175,6 +174,8 @@ def get_help_for_command(cmd_name: str) -> str: if args.command_name is not None: # !help result = get_help_for_command(args.command_name) + if result is None: + result = f"Unknown command '{args.command_name}'" await Command.send_message(execution_ctx, result) return # !help