From 81c00410a5be90a2ab008843e3cd76133ff36e98 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 24 Sep 2024 22:51:19 +0100 Subject: [PATCH] bug --- lgsm/modules/alert_discord.sh | 89 +++++------------------------------ 1 file changed, 13 insertions(+), 76 deletions(-) diff --git a/lgsm/modules/alert_discord.sh b/lgsm/modules/alert_discord.sh index 20d7a145a..78e029349 100644 --- a/lgsm/modules/alert_discord.sh +++ b/lgsm/modules/alert_discord.sh @@ -29,95 +29,32 @@ json=$( "url": "${alerticon}" }, "fields": [ - { - "name": "Server Name", - "value": "${servername}" - }, - { - "name": "Information", - "value": "${alertmessage}" - }, - { - "name": "Game", - "value": "${gamename}", - "inline": true - }, { - "name": "Server Time", - "value": "$(date)", - "inline": true - } - ], - "footer": { - "icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg", - "text": "Sent by LinuxGSM ${version}" - } - } - ] -} -EOF -) - -jsonnoinfo=$( - cat << EOF -{ - "username": "LinuxGSM", - "avatar_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg", - "file": "content", - "embeds": [ - { - "author": { - "name": "LinuxGSM Alert", - "url": "", - "icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg" - }, - "title": "${alerttitle}", - "url": "", - "description": "", - "color": "${alertcolourdec}", - "type": "content", - "thumbnail": { - "url": "${alerticon}" - }, - "fields": [ - { - "name": "Is my Game Server Online?", - "value": "https://ismygameserver.online/${querytype}/${alertip}:${queryport}", - "inline": true - }, -EOF -) - -json+=$( - cat << EOF - { - "name": "More info", - "value": "${alerturl}", - "inline": true - }, + "name": "Server Name", + "value": "${servername}" + }, + { + "name": "Information", + "value": "${alertmessage}" + }, { "name": "Game", "value": "${gamename}", "inline": true }, - { - "name": "Server IP", - "value": "\`${alertip}:${port}\`", - "inline": true - }, - { - "name": "Hostname", - "value": "${HOSTNAME}", - "inline": true - }, { "name": "Server Time", "value": "$(date)", "inline": true + }, + { + "name": "Is my Game Server Online?", + "value": "https://ismygameserver.online/${querytype}/${alertip}:${queryport}", + "inline": true } ], "footer": { - "icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg", + "icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg", "text": "Sent by LinuxGSM ${version}" } }