Beispiel #1
0
 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.")
Beispiel #2
0
 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."
         )
Beispiel #3
0
 def set_command_risk(new_risk):
     return set_risk(new_risk)