File tree 1 file changed +16
-1
lines changed
1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -46,12 +46,25 @@ json=$(
46
46
"name": "Server Time",
47
47
"value": "$( date) ",
48
48
"inline": true
49
- },
49
+ }
50
+ EOF
51
+ )
52
+
53
+ if [ -n " ${querytype} " ]; then
54
+ json+=$(
55
+ cat << EOF
56
+ ,
50
57
{
51
58
"name": "Is my Game Server Online?",
52
59
"value": "https://ismygameserver.online/${imgsoquerytype} /${alertip} :${queryport} ",
53
60
"inline": true
54
61
}
62
+ EOF
63
+ )
64
+ fi
65
+
66
+ json+=$(
67
+ cat << EOF
55
68
],
56
69
"footer": {
57
70
"icon_url": "https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /lgsm/data/alert_discord_logo.jpg",
@@ -63,6 +76,8 @@ json=$(
63
76
EOF
64
77
)
65
78
79
+ echo " ${json} "
80
+
66
81
fn_print_dots " Sending Discord alert"
67
82
68
83
discordsend=$( curl --connect-timeout 3 -sSL -H " Content-Type: application/json" -X POST -d " $( echo -n " ${json} " | jq -c .) " " ${discordwebhook} " )
You can’t perform that action at this time.
0 commit comments