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