@ -10,38 +10,46 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
jsonshortinfo = $(
jsonshortinfo = $(
cat << EOF
cat << EOF
{
{
"username" :"LinuxGSM" ,
"username" : "LinuxGSM" ,
"avatar_url" :" https://raw.githubusercontent.com/ ${ githubuser } / ${ githubrepo } / ${ githubbranch } /lgsm/data/alert_discord_logo.jpg " ,
"avatar_url" : " https://raw.githubusercontent.com/ ${ githubuser } / ${ githubrepo } / ${ githubbranch } /lgsm/data/alert_discord_logo.jpg " ,
"file" :"content" ,
"file" : "content" ,
"embeds" : [ {
"embeds" : [
"color" : "2067276" ,
{
"author" : {
"author" : {
"name" : " ${ alertemoji } ${ alertsubject } ${ alertemoji } " ,
"name" : " ${ alertemoji } ${ alertsubject } ${ alertemoji } " ,
"icon_url" : " https://raw.githubusercontent.com/ ${ githubuser } / ${ githubrepo } / ${ githubbranch } /lgsm/data/alert_discord_logo.jpg "
"url" : "" ,
} ,
"icon_url" : " https://raw.githubusercontent.com/ ${ githubuser } / ${ githubrepo } / ${ githubbranch } /lgsm/data/alert_discord_logo.jpg "
"title" : " ${ servername } " ,
} ,
"description" : " ${ alertbody } \n More info: ${ alerturl } " ,
"title" : " ${ servername } " ,
"url" : "" ,
"url" : "" ,
"type" : "content" ,
"description" : " ${ alertbody } \n More info: ${ alerturl } " ,
"thumbnail" : { } ,
"color" : " ${ alertcolourdec } " ,
"fields" : [
"type" : "content" ,
{
"thumbnail" : {
"name" : "Game" ,
"url" : " ${ alerticon } "
"value" : " ${ gamename } " ,
} ,
"inline" : true
"fields" : [
} ,
{
{
"name" : "Game" ,
"name" : "Server IP" ,
"value" : " ${ gamename } " ,
"value" : " [ ${ alertip } : ${ port } ](https://www.gametracker.com/server_info/ ${ alertip } : ${ port } ) " ,
"inline" : true
"inline" : true
} ,
} ,
{
{
"name" : "Server IP" ,
"name" : "Hostname" ,
"value" : " ${ alertip } : ${ port } " ,
"value" : " ${ HOSTNAME } " ,
"inline" : true
"inline" : true
} ,
}
{
]
"name" : "Hostname" ,
} ]
"value" : " ${ HOSTNAME } " ,
"inline" : true
}
] ,
"footer" : {
"text" : " Sent by LinuxGSM ${ version } "
}
}
]
}
}
EOF
EOF
)
)
@ -49,39 +57,46 @@ EOF
jsonshortnoinfo = $(
jsonshortnoinfo = $(
cat << EOF
cat << EOF
{
{
"username" :"LinuxGSM" ,
"username" : "LinuxGSM" ,
"avatar_url" :" https://raw.githubusercontent.com/ ${ githubuser } / ${ githubrepo } / ${ githubbranch } /lgsm/data/alert_discord_logo.jpg " ,
"avatar_url" : " https://raw.githubusercontent.com/ ${ githubuser } / ${ githubrepo } / ${ githubbranch } /lgsm/data/alert_discord_logo.jpg " ,
"file" :"content" ,
"file" : "content" ,
"embeds" : [ {
"embeds" : [
"color" : "2067276" ,
{
"author" : {
"author" : {
"name" : " ${ alertemoji } ${ alertsubject } ${ alertemoji } " ,
"name" : " ${ alertemoji } ${ alertsubject } ${ alertemoji } " ,
"icon_url" : " https://raw.githubusercontent.com/ ${ githubuser } / ${ githubrepo } / ${ githubbranch } /lgsm/data/alert_discord_logo.jpg "
"url" : "" ,
} ,
"icon_url" : " https://raw.githubusercontent.com/ ${ githubuser } / ${ githubrepo } / ${ githubbranch } /lgsm/data/alert_discord_logo.jpg "
"title" : " ${ servername } " ,
} ,
"description" : " ${ alertbody } " ,
"title" : " ${ servername } " ,
"color" : " ${ alertcolourdec } " ,
"url" : "" ,
"url" : "" ,
"description" : " ${ alertbody } " ,
"type" : "content" ,
"color" : " ${ alertcolourdec } " ,
"thumbnail" : { } ,
"type" : "content" ,
"fields" : [
"thumbnail" : {
{
"url" : " ${ alerticon } "
"name" : "Game" ,
} ,
"value" : " ${ gamename } " ,
"fields" : [
"inline" : true
{
} ,
"name" : "Game" ,
{
"value" : " ${ gamename } " ,
"name" : "Server IP" ,
"inline" : true
"value" : " ${ alertip } : ${ port } " ,
} ,
"inline" : true
{
} ,
"name" : "Server IP" ,
{
"value" : " ${ alertip } : ${ port } " ,
"name" : "Hostname" ,
"inline" : true
"value" : " ${ HOSTNAME } " ,
} ,
"inline" : true
{
}
"name" : "Hostname" ,
]
"value" : " ${ HOSTNAME } " ,
} ]
"inline" : true
}
] ,
"footer" : {
"text" : " Sent by LinuxGSM ${ version } "
}
}
]
}
}
EOF
EOF
)
)