s/trade_thresholds/minimal_roi/
This commit is contained in:
@@ -237,11 +237,14 @@ class TelegramHandler(object):
|
||||
:return: None
|
||||
"""
|
||||
if conf['telegram'].get('enabled', False):
|
||||
bot = bot or TelegramHandler.get_updater(conf).bot
|
||||
try:
|
||||
bot.send_message(conf['telegram']['chat_id'], msg, parse_mode=parse_mode)
|
||||
except NetworkError as e:
|
||||
logger.warning('Got Telegram NetworkError: {}! trying one more time'.format(e.message))
|
||||
bot.send_message(conf['telegram']['chat_id'], msg, parse_mode=parse_mode)
|
||||
bot = bot or TelegramHandler.get_updater(conf).bot
|
||||
try:
|
||||
bot.send_message(conf['telegram']['chat_id'], msg, parse_mode=parse_mode)
|
||||
except NetworkError as e:
|
||||
# Sometimes the telegram server resets the current connection,
|
||||
# if this is the case we send the message again.
|
||||
logger.warning('Got Telegram NetworkError: {}! trying one more time'.format(e.message))
|
||||
bot.send_message(conf['telegram']['chat_id'], msg, parse_mode=parse_mode)
|
||||
except Exception:
|
||||
logger.exception('Exception occurred within Telegram API')
|
||||
|
Reference in New Issue
Block a user