#!/bin/bash # LinuxGSM alert_discord.sh function # Author: Daniel Gibbs # Contributor: faflfama, diamondburned # Website: https://linuxgsm.com # Description: Sends Discord alert. if ! command -v jq > /dev/null; then fn_print_fail_nl "Sending Discord alert: jq is missing." fn_script_log_fatal "Sending Discord alert: jq is missing." fi escaped_servername="$(echo -n "${servername}" | jq -sRr "@json")" escaped_alertbody="$(echo -n "${alertbody}" | jq -sRr "@json")" json=$(cat <