Changing Slack Notifications to Discord - Depreciated

I use slack for work and while it works, the limit on how many post to a free account is really annoying, especially when I want to use it as a notification system rather than blowing up my inbox.

Changing Slack Notifications to Discord - Depreciated

This guide is now outdated as discord notifications are built into Unraid. Leaving here for retention purposes.

I use slack for work and while it works, the limit on how many post to a free account is really annoying, especially when I want to use it as a notification system rather than blowing up my inbox.

Well someone helped out and made it possible to change the slack notification to discord.

#!/bin/bash

# Replace Slack.sh in /boot/config/plugins/dynamix/notifications/agents
# Set to your Discord webhook token.
WEBHOOK="https://discordapp.com/api/webhooks/ID/TOKEN"

curl "$WEBHOOK" \
-X "POST" \
-H 'Content-Type: application/json' \
--data @<(cat <<EOF
{
  "embeds": [
    {
      "title": "$EVENT",
      "description": "$SUBJECT",
      "footer": {
        "text": "$(date) on $(hostname)"
      },
      "thumbnail": {
        "url": "https://i.imgur.com/tlooVc1.png",
        "height": 16,
        "width": 16
      },
      "fields": [
        {
          "name": "Priority",
          "value": "${IMPORTANCE^}"
        },
        {
          "name": "Description",
          "value": "$DESCRIPTION\n\n$CONTENT"
        }
      ]
    }
  ]
}
EOF
)vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv#!/bin/bash

# Replace Slack.sh in /boot/config/plugins/dynamix/notifications/agents
# Set to your Discord webhook token.
WEBHOOK="https://discordapp.com/api/webhooks/ID/TOKEN"

curl "$WEBHOOK" \
-X "POST" \
-H 'Content-Type: application/json' \
--data @<(cat <<EOF
{
  "embeds": [
    {
      "title": "$EVENT",
      "description": "$SUBJECT",
      "footer": {
        "text": "$(date) on $(hostname)"
      },
      "thumbnail": {
        "url": "https://i.imgur.com/tlooVc1.png",
        "height": 16,
        "width": 16
      },
      "fields": [
        {
          "name": "Priority",
          "value": "${IMPORTANCE^}"
        },
        {
          "name": "Description",
          "value": "$DESCRIPTION\n\n$CONTENT"
        }
      ]
    }
  ]
}
EOF
)