From 7a0fc70d81db2f8e859b636982cd7390746073ce Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 8 Jan 2025 19:12:05 +0000 Subject: [PATCH] fix: add missing imgso filter if not required in discord alert --- lgsm/modules/alert_discord.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/lgsm/modules/alert_discord.sh b/lgsm/modules/alert_discord.sh index 3b489984d1..2b50f0c01a 100644 --- a/lgsm/modules/alert_discord.sh +++ b/lgsm/modules/alert_discord.sh @@ -46,12 +46,25 @@ json=$( "name": "Server Time", "value": "$(date)", "inline": true - }, + } +EOF +) + +if [ -n "${querytype}" ]; then + json+=$( + cat << EOF + , { "name": "Is my Game Server Online?", "value": "https://ismygameserver.online/${imgsoquerytype}/${alertip}:${queryport}", "inline": true } +EOF + ) +fi + +json+=$( + cat << EOF ], "footer": { "icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg",