예제 #1
0
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)
예제 #2
0
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)
예제 #3
0
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)
예제 #4
0
 def close_callback():
     Commands.stop_bot(get_bot())
예제 #5
0
파일: bot.py 프로젝트: lipq525/OctoBot
 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())
예제 #6
0
파일: bot.py 프로젝트: GianlucaCode/OctoBot
 def command_stop(_, update):
     # TODO add confirmation
     update.message.reply_text("I'm leaving this world...")
     Commands.stop_bot(get_bot())