Optional /whitelist args - sorted, nobase
Added two optional arguments for whitelist - `sorted` for alphabetical order and `nobase` for displaying the whitelist without base currency e.g. /USDT. Updated help with optional commands. Added a space in an unrelated help message.
This commit is contained in:
parent
573964b19f
commit
c0d60c63ab
@ -1368,6 +1368,12 @@ class Telegram(RPCHandler):
|
||||
try:
|
||||
whitelist = self._rpc._rpc_whitelist()
|
||||
|
||||
if context.args:
|
||||
if "sorted" in context.args:
|
||||
whitelist['whitelist'] = sorted(whitelist['whitelist'])
|
||||
if "nobase" in context.args:
|
||||
whitelist['whitelist'] = [pair.split("/")[0] for pair in whitelist['whitelist']]
|
||||
|
||||
message = f"Using whitelist `{whitelist['method']}` with {whitelist['length']} pairs\n"
|
||||
message += f"`{', '.join(whitelist['whitelist'])}`"
|
||||
|
||||
@ -1487,7 +1493,8 @@ class Telegram(RPCHandler):
|
||||
"*/fx <trade_id>|all:* `Alias to /forceexit`\n"
|
||||
f"{force_enter_text if self._config.get('force_entry_enable', False) else ''}"
|
||||
"*/delete <trade_id>:* `Instantly delete the given trade in the database`\n"
|
||||
"*/whitelist:* `Show current whitelist` \n"
|
||||
"*/whitelist [sorted] [nobase]:* `Show current whitelist. Optionally in "
|
||||
"order and/or without the base currency.`\n"
|
||||
"*/blacklist [pair]:* `Show current blacklist, or adds one or more pairs "
|
||||
"to the blacklist.` \n"
|
||||
"*/blacklist_delete [pairs]| /bl_delete [pairs]:* "
|
||||
|
Loading…
Reference in New Issue
Block a user