diff --git a/zerver/lib/onboarding.py b/zerver/lib/onboarding.py index afcd4eb04f..12b3d9fff0 100644 --- a/zerver/lib/onboarding.py +++ b/zerver/lib/onboarding.py @@ -93,7 +93,7 @@ def send_initial_pms(user: UserProfile) -> None: ) + "\n\n", _("Here are a few messages I understand:") + " ", - bot_commands(is_initial_pm=True), + bot_commands(), ] ) @@ -109,7 +109,7 @@ def send_initial_pms(user: UserProfile) -> None: ) -def bot_commands(is_initial_pm: bool = False) -> str: +def bot_commands(no_help_command: bool = False) -> str: commands = [ "apps", "profile", @@ -119,7 +119,7 @@ def bot_commands(is_initial_pm: bool = False) -> str: "message formatting", "keyboard shortcuts", ] - if is_initial_pm: + if not no_help_command: commands.append("help") return ", ".join(["`" + command + "`" for command in commands]) + "." @@ -201,7 +201,7 @@ def select_welcome_bot_response(human_response_lower: str) -> str: return "".join( [ _("Here are a few messages I understand:") + " ", - bot_commands() + "\n\n", + bot_commands(no_help_command=True) + "\n\n", _( "Check out our [Getting started guide](/help/getting-started-with-zulip), " "or browse the [Help center](/help/) to learn more!" diff --git a/zerver/tests/test_tutorial.py b/zerver/tests/test_tutorial.py index 112475a9ab..cf9716c1f5 100644 --- a/zerver/tests/test_tutorial.py +++ b/zerver/tests/test_tutorial.py @@ -159,7 +159,7 @@ class TutorialTests(ZulipTestCase): expected_response = ( "I’m sorry, I did not understand your message. Please try one of the following commands: " "`apps`, `profile`, `theme`, `streams`, " - "`topics`, `message formatting`, `keyboard shortcuts`." + "`topics`, `message formatting`, `keyboard shortcuts`, `help`." ) self.assertEqual(most_recent_message(user).content, expected_response)