Add webhooks

This commit is contained in:
2021-12-07 20:16:58 +01:00
parent 0b387cc792
commit 8b8b210968
5 changed files with 451 additions and 94 deletions

View File

@ -31,3 +31,9 @@ class Settings:
# We check if the upload folder ends with a forward slash. If it does, we remove it.
if upload_folder.endswith("/"):
upload_folder = upload_folder[:-1]
# Discord webhook URL
try:
webhook_url = os.environ["WEBHOOK_URL"]
except KeyError:
sys.exit("discord-embed: Environment variable 'WEBHOOK_URL' is missing!")