From 5c8f2034c3425dec9d4aec08bf9e0e08a84982d6 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Wed, 13 Feb 2019 00:05:17 +0200 Subject: [PATCH] Fix formatting in command helps --- mautrix_telegram/commands/matrix_auth.py | 4 ++-- mautrix_telegram/commands/portal/admin.py | 4 ++-- mautrix_telegram/commands/telegram/account.py | 3 ++- mautrix_telegram/commands/telegram/misc.py | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/mautrix_telegram/commands/matrix_auth.py b/mautrix_telegram/commands/matrix_auth.py index d1ccad17..2e27744f 100644 --- a/mautrix_telegram/commands/matrix_auth.py +++ b/mautrix_telegram/commands/matrix_auth.py @@ -35,7 +35,7 @@ async def logout_matrix(evt: CommandEvent) -> Optional[Dict]: @command_handler(needs_auth=True, management_only=True, needs_matrix_puppeting=True, help_section=SECTION_AUTH, help_text="Replace your Telegram account's Matrix puppet with your own Matrix " - "account") + "account.") async def login_matrix(evt: CommandEvent) -> Optional[Dict]: puppet = pu.Puppet.get(evt.sender.tgid) if puppet.is_real_user: @@ -70,7 +70,7 @@ async def login_matrix(evt: CommandEvent) -> Optional[Dict]: @command_handler(needs_auth=True, needs_matrix_puppeting=True, help_section=SECTION_AUTH, - help_text="Pings the server with the stored matrix authentication") + help_text="Pings the server with the stored matrix authentication.") async def ping_matrix(evt: CommandEvent) -> Optional[Dict]: puppet = pu.Puppet.get(evt.sender.tgid) if not puppet.is_real_user: diff --git a/mautrix_telegram/commands/portal/admin.py b/mautrix_telegram/commands/portal/admin.py index 2a2e22c0..4815eb28 100644 --- a/mautrix_telegram/commands/portal/admin.py +++ b/mautrix_telegram/commands/portal/admin.py @@ -47,7 +47,7 @@ async def set_power_level(evt: CommandEvent) -> Dict: @command_handler(needs_admin=True, needs_auth=False, help_section=SECTION_ADMIN, - help_args="", + help_args="<`portal`|`puppet`|`user`>", help_text="Clear internal bridge caches") async def clear_db_cache(evt: CommandEvent) -> Dict: try: @@ -79,7 +79,7 @@ async def clear_db_cache(evt: CommandEvent) -> Dict: @command_handler(needs_admin=True, needs_auth=False, help_section=SECTION_ADMIN, - help_args="[user]", + help_args="[_mxid_]", help_text="Reload and reconnect a user") async def reload_user(evt: CommandEvent) -> Dict: if len(evt.args) > 0: diff --git a/mautrix_telegram/commands/telegram/account.py b/mautrix_telegram/commands/telegram/account.py index 5d273729..0182c726 100644 --- a/mautrix_telegram/commands/telegram/account.py +++ b/mautrix_telegram/commands/telegram/account.py @@ -24,7 +24,8 @@ from mautrix_telegram.commands import command_handler, CommandEvent, SECTION_AUT @command_handler(needs_auth=True, help_section=SECTION_AUTH, - help_text="Change your Telegram username") + help_args="<_new username_>", + help_text="Change your Telegram username.") async def username(evt: CommandEvent) -> Optional[Dict]: if len(evt.args) == 0: return await evt.reply("**Usage:** `$cmdprefix+sp username `") diff --git a/mautrix_telegram/commands/telegram/misc.py b/mautrix_telegram/commands/telegram/misc.py index 01942d17..11be71ba 100644 --- a/mautrix_telegram/commands/telegram/misc.py +++ b/mautrix_telegram/commands/telegram/misc.py @@ -168,8 +168,8 @@ PEER_TYPE_CHAT = b"g" @command_handler(help_section=SECTION_MISC, - help_args="", - help_text="Play a Telegram game") + help_args="<_play ID_>", + help_text="Play a Telegram game.") async def play(evt: CommandEvent) -> Optional[Dict]: if len(evt.args) < 1: return await evt.reply("**Usage:** `$cmdprefix+sp play `")