Browse Source
fix(alert_discord): reorder fields in Discord alert JSON
* Changed the order of fields in the Discord alert JSON structure.
* Updated the "More info" and "Is my Game Server Online?" fields for better clarity.
pull/4854/head
Daniel Gibbs
7 months ago
Failed to extract signature
1 changed files with
8 additions and
9 deletions
lgsm/modules/alert_discord.sh
@ -43,34 +43,33 @@ json=$(
"inline" : true
} ,
{
"name" : "Server Time " ,
"value" : " $( date) " ,
"name" : "Address:Port " ,
"value" : " \` ${ alertip } : ${ port } \` " ,
"inline" : true
}
EOF
)
if [ -n " ${ querytype } " ] ; then
if [ -n " ${ alerturl } " ] ; then
json += $(
cat << EOF
,
{
"name" : "Is my Game Server Online? " ,
"value" : " https://ismygameserver.online/ ${ imgsoquerytype } / ${ alertip } : ${ queryport } " ,
"name" : "More info " ,
"value" : " ${ alerturl } " ,
"inline" : true
}
EOF
)
fi
if [ -n " ${ alerturl } " ] ; then
if [ -n " ${ querytype } " ] ; then
json += $(
cat << EOF
,
{
"name" : "More info" ,
"value" : " ${ alerturl } " ,
"inline" : true
"name" : "Is my Game Server Online?" ,
"value" : " https://ismygameserver.online/ ${ imgsoquerytype } / ${ alertip } : ${ queryport } "
}
EOF
)