From 0fb70c1ffee132389a6df7dedfce7374754c0265 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sat, 3 Feb 2018 17:10:51 +0200 Subject: [PATCH] Improve help text format --- mautrix_telegram/commands.py | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/mautrix_telegram/commands.py b/mautrix_telegram/commands.py index 3a1d3b4b..9f425a58 100644 --- a/mautrix_telegram/commands.py +++ b/mautrix_telegram/commands.py @@ -402,37 +402,44 @@ class CommandHandler: @command_handler def help(self, sender, args): if self._is_management: - management_status = ("This is a management room: prefixing commands" + management_status = ("This is a management room: prefixing commands " "with `$cmdprefix` is not required.\n") elif self._is_portal: - management_status = ("**This is a portal room**: you must always" + management_status = ("**This is a portal room**: you must always " "prefix commands with `$cmdprefix`.\n" "Management commands will not be sent to Telegram.") else: - management_status = ("**This is not a management room**: you must" + management_status = ("**This is not a management room**: you must " "prefix commands with `$cmdprefix`.\n") - help = """ -_**Generic bridge commands**: commands for using the bridge that aren't related to Telegram._ + help = """\n +#### Generic bridge commands **help** - Show this help message. -**cancel** - Cancel an ongoing action (such as login). +**cancel** - Cancel an ongoing action (such as login). -_**Telegram actions**: commands for using the bridge to interact with Telegram._ +#### Authentication **login** <_phone_> - Request an authentication code. **logout** - Log out from Telegram. -**ping** - Check if you're logged into Telegram. +**ping** - Check if you're logged into Telegram. + +#### Initiating chats **search** [_-r|--remote_] <_query_> - Search your contacts or the Telegram servers for users. **pm** <_identifier_> - Open a private chat with the given Telegram user. The identifier is either the internal user ID, the username or the phone number. **join** <_link_> - Join a chat with an invite link. **create** [_type_] - Create a Telegram chat of the given type for the current Matrix room. - The type is either `group`, `supergroup` or `channel` (defaults to `group`). -**upgrade** - Upgrade a normal Telegram group to a supergroup. + The type is either `group`, `supergroup` or `channel` (defaults to `group`). + +#### Portal management +† **upgrade** - Upgrade a normal Telegram group to a supergroup. **invitelink** - Get a Telegram invite link to the current chat. **deleteportal** - Forget the current portal room. Only works for group chats; to delete a private chat portal, simply leave the room. -**setpublic** <_yes/no_> - Change whether or not a supergroup/channel is public. -**groupname** <_name_> - Change the username of a supergroup/channel. +† **setpublic** <_yes/no_> - Change whether or not a supergroup/channel is public. +† **groupname** <_name_> - Change the username of a supergroup/channel. To disable, use `setpublic no`. + + +† Not yet implemented """ return self.reply(management_status + help)