Make whole scheme way more user friendly
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user