def command_risk(_, update): try: risk = float(TelegramApp.get_command_param("/set_risk", update)) set_risk(risk) update.message.reply_text("New risk set successfully.") except Exception: update.message.reply_text("Failed to set new risk, please provide a number between 0 and 1.")
def command_risk(_, update): try: risk = float(TelegramApp.get_command_param("/set_risk", update)) set_risk(risk) update.message.reply_text("New risk set successfully.") except Exception: update.message.reply_text( "Failed to set new risk, please provide a number between 0 and 1." )
def set_command_risk(new_risk): return set_risk(new_risk)