Integrate dashboard to the bot #2

Merged
swee merged 2 commits from 10kilo/MeowNex:main into main 2024-12-06 18:01:41 -08:00
Showing only changes of commit 238c4e8c92 - Show all commits

View file

@ -25,16 +25,14 @@ def index():
return send_file("sweebot.html", mimetype='text/html') return send_file("sweebot.html", mimetype='text/html')
@app.route('/run.txt') @app.route('/run.txt')
def run(): def run():
wait(2)
return str(run) return str(run)
@app.route('/block.txt') @app.route('/block.txt')
def block(): def block():
wait(2)
return str(block) return str(block)
@app.route('/script.js') @app.route('/script.js')
def script(): def script():
return send_file("script.js", mimetype='application/javascript') return send_file("script.js", mimetype='application/javascript')
threading.Thread(target=app.run, daemon=True) threading.Thread(target=app.run, daemon=True, kwargs={"port": 2005}).start()
DEVELOPER_KEY = environ["ytapi"] DEVELOPER_KEY = environ["ytapi"]