ameliabot/bot.py

20 lines
498 B
Python
Raw Normal View History

2022-04-19 13:27:39 +03:00
#!/usr/bin/env python
from flask import Flask, Response
from ameliabot import owncast, __version__
2022-04-19 13:27:39 +03:00
from ameliabot.logger import logging
logging.info("Loaded %s v%s" % (owncast.config["bot_name"], __version__))
2022-04-19 13:27:39 +03:00
# 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)