Explorar el Código

updating discord alert

WIP
Daniel Gibbs hace 5 años
padre
commit
462b8e22a2
Se han modificado 1 ficheros con 41 adiciones y 26 borrados
  1. 41 26
      lgsm/functions/alert_discord.sh

+ 41 - 26
lgsm/functions/alert_discord.sh

@@ -14,38 +14,53 @@ fi
 
 
 json=$(cat <<EOF
 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}",
 				"value": "${gamename}",
 				"inline": true
 				"inline": true
-			},
-			{
-				"name": "Server IP",
+        },
+        {
+        "name": "Server IP",
 				"value": "[${alertip}:${port}](https://www.gametracker.com/server_info/${alertip}:${port})",
 				"value": "[${alertip}:${port}](https://www.gametracker.com/server_info/${alertip}:${port})",
 				"inline": true
 				"inline": true
-			},
-			{
-				"name": "Hostname",
+        },
+        {
+        "name": "Hostname",
 				"value": "${HOSTNAME}",
 				"value": "${HOSTNAME}",
 				"inline": true
 				"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
 EOF
 )
 )