예제 #1
0
파일: bot.py 프로젝트: GianlucaCode/OctoBot
 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.")
예제 #2
0
파일: bot.py 프로젝트: lipq525/OctoBot
 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."
         )
예제 #3
0
 def set_command_risk(new_risk):
     return set_risk(new_risk)