Improve /help output from telegram

This commit is contained in:
Matthias 2021-11-13 08:46:06 +01:00
parent 4d1ce51207
commit df27499e19

View File

@ -1233,44 +1233,56 @@ class Telegram(RPCHandler):
forcebuy_text = ("*/forcebuy <pair> [<rate>]:* `Instantly buys the given pair. " forcebuy_text = ("*/forcebuy <pair> [<rate>]:* `Instantly buys the given pair. "
"Optionally takes a rate at which to buy " "Optionally takes a rate at which to buy "
"(only applies to limit orders).` \n") "(only applies to limit orders).` \n")
message = ("*/start:* `Starts the trader`\n" message = (
"*/stop:* `Stops the trader`\n" "_BotControl_\n"
"*/status <trade_id>|[table]:* `Lists all open trades`\n" "------------\n"
" *<trade_id> :* `Lists one or more specific trades.`\n" "*/start:* `Starts the trader`\n"
" `Separate multiple <trade_id> with a blank space.`\n" "*/stop:* Stops the trader\n"
" *table :* `will display trades in a table`\n" "*/stopbuy:* `Stops buying, but handles open trades gracefully` \n"
" `pending buy orders are marked with an asterisk (*)`\n" "*/forcesell <trade_id>|all:* `Instantly sells the given trade or all trades, "
" `pending sell orders are marked with a double asterisk (**)`\n" "regardless of profit`\n"
"*/buys <pair|none>:* `Shows the buy_tag performance`\n" f"{forcebuy_text if self._config.get('forcebuy_enable', False) else ''}"
"*/sells <pair|none>:* `Shows the sell reason performance`\n" "*/delete <trade_id>:* `Instantly delete the given trade in the database`\n"
"*/mix_tags <pair|none>:* `Shows combined buy tag + sell reason performance`\n" "*/whitelist:* `Show current whitelist` \n"
"*/trades [limit]:* `Lists last closed trades (limited to 10 by default)`\n" "*/blacklist [pair]:* `Show current blacklist, or adds one or more pairs "
"*/profit [<n>]:* `Lists cumulative profit from all finished trades, " "to the blacklist.` \n"
"over the last n days`\n" "*/reload_config:* `Reload configuration file` \n"
"*/forcesell <trade_id>|all:* `Instantly sells the given trade or all trades, " "*/unlock <pair|id>:* `Unlock this Pair (or this lock id if it's numeric)`\n"
"regardless of profit`\n"
f"{forcebuy_text if self._config.get('forcebuy_enable', False) else ''}"
"*/delete <trade_id>:* `Instantly delete the given trade in the database`\n"
"*/performance:* `Show performance of each finished trade grouped by pair`\n"
"*/daily <n>:* `Shows profit or loss per day, over the last n days`\n"
"*/stats:* `Shows Wins / losses by Sell reason as well as "
"Avg. holding durationsfor buys and sells.`\n"
"*/count:* `Show number of active trades compared to allowed number of trades`\n"
"*/locks:* `Show currently locked pairs`\n"
"*/unlock <pair|id>:* `Unlock this Pair (or this lock id if it's numeric)`\n"
"*/balance:* `Show account balance per currency`\n"
"*/stopbuy:* `Stops buying, but handles open trades gracefully` \n"
"*/reload_config:* `Reload configuration file` \n"
"*/show_config:* `Show running configuration` \n"
"*/logs [limit]:* `Show latest logs - defaults to 10` \n"
"*/whitelist:* `Show current whitelist` \n"
"*/blacklist [pair]:* `Show current blacklist, or adds one or more pairs "
"to the blacklist.` \n"
"*/edge:* `Shows validated pairs by Edge if it is enabled` \n"
"*/help:* `This help message`\n"
"*/version:* `Show version`")
self._send_msg(message) "_Current state_\n"
"------------\n"
"*/show_config:* `Show running configuration` \n"
"*/locks:* `Show currently locked pairs`\n"
"*/balance:* `Show account balance per currency`\n"
"*/logs [limit]:* `Show latest logs - defaults to 10` \n"
"*/count:* `Show number of active trades compared to allowed number of trades`\n"
"*/edge:* `Shows validated pairs by Edge if it is enabled` \n"
"_Statistics_\n"
"------------\n"
"*/status <trade_id>|[table]:* `Lists all open trades`\n"
" *<trade_id> :* `Lists one or more specific trades.`\n"
" `Separate multiple <trade_id> with a blank space.`\n"
" *table :* `will display trades in a table`\n"
" `pending buy orders are marked with an asterisk (*)`\n"
" `pending sell orders are marked with a double asterisk (**)`\n"
"*/buys <pair|none>:* `Shows the buy_tag performance`\n"
"*/sells <pair|none>:* `Shows the sell reason performance`\n"
"*/mix_tags <pair|none>:* `Shows combined buy tag + sell reason performance`\n"
"*/trades [limit]:* `Lists last closed trades (limited to 10 by default)`\n"
"*/profit [<n>]:* `Lists cumulative profit from all finished trades, "
"over the last n days`\n"
"*/performance:* `Show performance of each finished trade grouped by pair`\n"
"*/daily <n>:* `Shows profit or loss per day, over the last n days`\n"
"*/weekly <n>:* `Shows statistics per week, over the last n weeks`\n"
"*/monthly <n>:* `Shows statistics per month, over the last n months`\n"
"*/stats:* `Shows Wins / losses by Sell reason as well as "
"Avg. holding durationsfor buys and sells.`\n"
"*/help:* `This help message`\n"
"*/version:* `Show version`"
)
self._send_msg(message, parse_mode=ParseMode.MARKDOWN)
@authorized_only @authorized_only
def _version(self, update: Update, context: CallbackContext) -> None: def _version(self, update: Update, context: CallbackContext) -> None: