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)