WebHook broker that accepts notifications from multiple platforms and performs simple actions in response
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

reportbot.py 462B

123456789101112131415161718
  1. import requests
  2. from .service import Service
  3. class ReportBot(Service):
  4. def __init__(self, url, key, channel):
  5. super().__init__("reportbot")
  6. self._url = url
  7. self._key = key
  8. self._channel = channel
  9. def announce(self, message):
  10. for line in message.split("\n"):
  11. requests.post(
  12. self._url,
  13. {"key": self._key, "command": f"CM {self._channel}", "args": line},
  14. )