ameliabot/bot.py

21 lines
528 B
Python

#!/usr/bin/env python
from flask import Flask, Response
from core import owncast, __version__
from core.logger import logging
app = Flask(__name__)
logging.info("Loaded %s, running ameliabot v%s" % (
owncast.config["DEFAULT"]["BotName"], __version__))
# the url of the Owncast API for bot posts
owncast_url = "{}/api/integrations/chat/send".format(
owncast.config["owncast"]["ServerURL"])
@app.route('/webhook/owncast', methods=['POST'])
def respond():
owncast.parse_webhook()
return Response(status=200)