Update webhook to be compatible with discord

pull/66/head
randomuser345 2 years ago
parent 0c1a28a959
commit e5eb5be9d8

@ -119,7 +119,7 @@ Container images are configured using parameters passed at runtime (such as thos
| `-e plexUrl=http://x.x.x.x:32400` | ONLY used if PlexNotify.bash is used...|
| `-e plexToken=` | ONLY used if PlexNotify.bash is used... |
| `-e youtubeSubtitleLanguage=en` | Desired Language Code :: For guidence, please see yt-dlp documentation.
| `-e webHook=https://myhook.mydomain.com` | POST's to this URL on error events which prevent the script from working. Content is JSON `{"event":"eventtype", "message":"eventmessage"}` |
| `-e webHook=https://myhook.mydomain.com` | POST's to this URL on error events which prevent the script from working. Content is JSON `{"event":"eventtype", "message":"eventmessage", "content":"eventtype: eventmessage"}` |
| `-e enableQueueCleaner=true` | true = enabled :: Enables QueueCleaner Script that automatically removes stuck downloads that cannot be automatically imported on a 15 minute interval |
## Usage

@ -1,5 +1,5 @@
#!/usr/bin/env bash
scriptVersion="1.0.245"
scriptVersion="1.0.246"
if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then
lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)"
if [ "$lidarrUrlBase" = "null" ]; then
@ -1909,7 +1909,8 @@ audioFlacVerification () {
NotifyWebhook () {
if [ "$webHook" ]
then
curl -X POST "{$webHook}" -H 'Content-Type: application/json' -d '{"event":"'"$1"'", "message":"'"$2"'"}'
content="$1: $2"
curl -X POST "{$webHook}" -H 'Content-Type: application/json' -d '{"event":"'"$1"'", "message":"'"$2"'", "content":"'"$content"'"}'
fi
}

@ -1,5 +1,5 @@
#!/usr/bin/env bash
scriptVersion="1.0.039"
scriptVersion="1.0.040"
if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then
lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)"
@ -563,7 +563,8 @@ AddFeaturedVideoArtists () {
NotifyWebhook () {
if [ "$webHook" ]
then
curl -X POST "{$webHook}" -H 'Content-Type: application/json' -d '{"event":"'"$1"'", "message":"'"$2"'"}'
content="$1: $2"
curl -X POST "{$webHook}" -H 'Content-Type: application/json' -d '{"event":"'"$1"'", "message":"'"$2"'", "content":"'"$content"'"}'
fi
}

Loading…
Cancel
Save