diff --git a/freqtrade/rpc/telegram.py b/freqtrade/rpc/telegram.py index 5312125ed..4b320eb85 100644 --- a/freqtrade/rpc/telegram.py +++ b/freqtrade/rpc/telegram.py @@ -45,6 +45,7 @@ def init(config: dict) -> None: CommandHandler('stop', _stop), CommandHandler('forcesell', _forcesell), CommandHandler('performance', _performance), + CommandHandler('help', _help), ] for handle in handles: _updater.dispatcher.add_handler(handle) @@ -301,6 +302,27 @@ def _performance(bot: Bot, update: Update) -> None: send_msg(message, parse_mode=ParseMode.HTML) +@authorized_only +def _help(bot: Bot, update: Update) -> None: + """ + Handler for /help. + Show commands of the bot + :param bot: telegram bot + :param update: message update + :return: None + """ + message = """ +*/start:* `Starts the trader` +*/stop:* `Stops the trader` +*/status:* `Lists all open trades` +*/profit:* `Lists cumulative profit from all finished trades` +*/forcesell :* `Instantly sells the given trade, regardless of profit` +*/performance:* `Show performance of each finished trade grouped by pair` +*/help:* `This help message` + """ + send_msg(message, bot=bot) + + def send_msg(msg: str, bot: Bot = None, parse_mode: ParseMode = ParseMode.MARKDOWN) -> None: """ Send given markdown message diff --git a/requirements.txt b/requirements.txt index be3a292f0..3483bc50e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ -e git+https://github.com/ericsomdahl/python-bittrex.git@d7033d0#egg=python-bittrex SQLAlchemy==1.1.14 -python-telegram-bot==8.0 +python-telegram-bot==8.1.1 arrow==0.10.0 requests==2.18.4 urllib3==1.22 diff --git a/setup.py b/setup.py index e89fd2eee..eced2b5b3 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ setup(name='freqtrade', install_requires=[ 'python-bittrex==0.1.3', 'SQLAlchemy==1.1.13', - 'python-telegram-bot==8.0', + 'python-telegram-bot==8.1.1', 'arrow==0.10.0', 'requests==2.18.4', 'urllib3==1.22',