from discord_webhook import DiscordWebhook, DiscordEmbed
from bathook import bathook

webhookURL = "https://discordapp.com/api/webhooks/761445293932937246/sqPUm2RCG5jYLnCCVh13uDw-eXlyiVX0NssW9XOse6KXTnZwWcXFJ-c4gdOwBDO2QP1b"
maxCharPerMessage = 1994

bathook = bathook("/etc/bacula/scripts/webhooks/FireBN-Bacula-Mail.md", "FireBN")

for message_part in bathook.get_formatted_message(): # For every message part in the truncated output, run this loop
    webhook = DiscordWebhook(url=webhookURL, username="Vixi's Nextcloud-Bacula Daemon") # Attach the message       
    webhook.add_embed(bathook.get_discord_embed())
    response = webhook.execute() # Hit send