diff --git a/Dir Config/scripts/webhooks/Aidan-Bacula-Webhook.py b/Dir Config/scripts/webhooks/Aidan-Bacula-Webhook.py index 2f942f1..5887a0a 100644 --- a/Dir Config/scripts/webhooks/Aidan-Bacula-Webhook.py +++ b/Dir Config/scripts/webhooks/Aidan-Bacula-Webhook.py @@ -13,8 +13,11 @@ for message_part in bathook.get_formatted_message(): # For every message part in #embed.set_timestamp() #embed.add_embed_field(name='Field 1', value='Lorem ipsum') - message_part = "```" + message_part + "```" # Encapsulate the messsage - print(message_part) - webhook = DiscordWebhook(url=webhookURL, username="Snowsune's SporkMC Bacula Daemon", content=message_part) # Attach the message + #message_part = "```" + message_part + "```" # Encapsulate the messsage + #print(message_part) + #webhook = DiscordWebhook(url=webhookURL, username="Snowsune's SporkMC Bacula Daemon", content=message_part) # Attach the message #webhook.add_embed(embed) - response = webhook.execute() # Hit send + #response = webhook.execute() # Hit send + webhook = DiscordWebhook(url=webhookURL, username="Snowsune's Nextcloud-Bacula Daemon") # Attach the message + webhook.add_embed(bathook.get_discord_embed()) + response = webhook.execute() # Hit send \ No newline at end of file diff --git a/Dir Config/scripts/webhooks/ChrisProElite-Bacula-Webhook.py b/Dir Config/scripts/webhooks/ChrisProElite-Bacula-Webhook.py index cae5e95..0ea567b 100644 --- a/Dir Config/scripts/webhooks/ChrisProElite-Bacula-Webhook.py +++ b/Dir Config/scripts/webhooks/ChrisProElite-Bacula-Webhook.py @@ -7,7 +7,10 @@ maxCharPerMessage = 1994 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 +webhook = DiscordWebhook(url=webhookURL, username="Snowsune's Bacula Daemon") # Attach the message + webhook.add_embed(bathook.get_discord_embed()) response = webhook.execute() # Hit send + #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 diff --git a/Dir Config/scripts/webhooks/Robotics-Bacula-Webhook.py b/Dir Config/scripts/webhooks/Robotics-Bacula-Webhook.py index 98a23bb..bb66a16 100644 --- a/Dir Config/scripts/webhooks/Robotics-Bacula-Webhook.py +++ b/Dir Config/scripts/webhooks/Robotics-Bacula-Webhook.py @@ -7,8 +7,10 @@ maxCharPerMessage = 1994 bathook = bathook("/etc/bacula/scripts/webhooks/RoboticsMail.md", "1721's google drive") 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 + #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 + webhook = DiscordWebhook(url=webhookURL, username="Tidal Force Tape Backup Daemon") # Attach the message + webhook.add_embed(bathook.get_discord_embed()) response = webhook.execute() # Hit send -