Make whole scheme way more user friendly

This commit is contained in:
Joe S
2020-11-02 17:09:28 -05:00
parent f10f4a1550
commit f3aeffe324
31 changed files with 471 additions and 567 deletions

View File

@@ -1,14 +0,0 @@
from discord_webhook import DiscordWebhook
from bathook import bathook
webhookURL = "https://discordapp.com/api/webhooks/742784012640190565/NBhtbWpDdgMZPx7uCXO8Ofw-o8Lez0V17EBGIvYv7FTIeTENK24GHNL3krUbYnOOIJ63"
maxCharPerMessage = 1994
rescheduled = ""
bathook = bathook("/etc/bacula/scripts/webhooks/ChrisProEliteMail.md", "nextcloud")
for message_part in bathook.get_formatted_message(): # For every message part in the truncated output, run this loop
message_part = "```" + message_part + "```" # Encapsulate the messsage
print(message_part)
webhook = DiscordWebhook(url=webhookURL, content=message_part) # Attach the message
response = webhook.execute() # Hit send