def commands(cmd=None): if cmd == "restart": Commands.restart_bot() return jsonify("Success") elif cmd == "stop": Commands.stop_bot(get_bot()) return jsonify("Success") return render_template('commands.html', cmd=cmd)
def commands(cmd=None): if cmd == "restart": Commands.restart_bot() return jsonify("Success") elif cmd == "stop": Commands.stop_bot(get_bot()) return jsonify("Success") return render_template('commands.html', cmd=cmd, metrics_enabled=get_metrics_enabled(), disclaimer=DISCLAIMER)
def commands(cmd=None): if cmd == "update": Commands.update(logger, catch=True) return jsonify("Success") elif cmd == "restart": Commands.restart_bot(get_bot(), args="--web") return jsonify("Success") elif cmd == "stop": Commands.stop_bot(get_bot()) return jsonify("Success") return render_template('commands.html', cmd=cmd)
def close_callback(): Commands.stop_bot(get_bot())
def command_stop(_, update): # TODO add confirmation update.message.reply_text("I'm leaving this world...") get_bot().stop_threads() Commands.stop_bot(get_bot())
def command_stop(_, update): # TODO add confirmation update.message.reply_text("I'm leaving this world...") Commands.stop_bot(get_bot())