Browse Source

updating discord alert

WIP
feature/alerts-refactor
Daniel Gibbs 4 years ago
parent
commit
462b8e22a2
  1. 67
      lgsm/functions/alert_discord.sh

67
lgsm/functions/alert_discord.sh

@ -14,38 +14,53 @@ fi
json=$(cat <<EOF
{
"username":"LinuxGSM",
"avatar_url":"https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.png",
"file":"content",
"embeds": [{
"color": "2067276",
"author": {
"name": "${alertemoji} ${alertsubject} ${alertemoji}",
"icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.png"
},
"title": "${servername}",
"description": "${alertbody} \n More info: ${alerturl}",
"url": "",
"type": "content",
"thumbnail": {},
"fields": [
{
"name": "Game",
"username": "LinuxGSM Alert",
"avatar_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg",
"content": "",
"embeds": [
{
"author": {
"name": "LinuxGSM",
"url": "",
"icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg"
},
"title": "${servername}",
"url": "",
"description": "${alertemoji} ${alertsubject}",
"color": 15258703,
"fields": [
{
"name": "Game",
"value": "${gamename}",
"inline": true
},
{
"name": "Server IP",
},
{
"name": "Server IP",
"value": "[${alertip}:${port}](https://www.gametracker.com/server_info/${alertip}:${port})",
"inline": true
},
{
"name": "Hostname",
},
{
"name": "Hostname",
"value": "${HOSTNAME}",
"inline": true
}
]
}]
},
{
"name": "Information",
"value": "${alertbody} \n More info: ${alerturl}"
}
],
"thumbnail": {
"url": "https://linuxgsm.com/wp-content/uploads/2020/07/minecraft-bedrock-icon.jpg"
},
"image": {
"url": "https://linuxgsm.com/wp-content/uploads/2021/02/mcbe-header.jpg"
},
"footer": {
"text": "Powered by LinuxGSM",
"icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg"
}
}
]
}
EOF
)

Loading…
Cancel
Save