Chitanda-Bot / keep_alive.py
E5K7's picture
Initial commit: Discord bot with hybrid commands, Flask keep-alive, and Docker support
7cc32a6
raw
history blame contribute delete
355 Bytes
from flask import Flask
from threading import Thread
app = Flask(__name__)
@app.route('/')
def home():
return "Bot is alive!"
@app.route('/health')
def health():
return {"status": "healthy", "bot": "Chitanda V2"}
def run():
app.run(host='0.0.0.0', port=7860)
def keep_alive():
t = Thread(target=run)
t.daemon = True
t.start()