gunicorn main:app
def run_flask(): app.run(port=5000)def run_discord(): bot.run(TOKEN)if __name__ == "__main__": flask_thread = threading.Thread(target=run_flask) discord_thread = threading.Thread(target=run_discord) flask_thread.start() discord_thread.start() flask_thread.join() discord_thread.join()