Browse Source

slack update

feature/alerts-refactor
Daniel Gibbs 4 years ago
parent
commit
7234648f28
  1. 27
      lgsm/functions/alert_slack.sh

27
lgsm/functions/alert_slack.sh

@ -37,14 +37,26 @@ json=$(cat <<EOF
"text": { "text": {
"type": "mrkdwn", "type": "mrkdwn",
"text": "*${alertemoji} ${alerttitle}* \n ${alertmessage}" "text": "*${alertemoji} ${alerttitle}* \n ${alertmessage}"
},
"accessory": {
"type": "image",
"image_url": "${alertimage}",
"alt_text": "Alert Image"
} }
}, },
{ {
"type": "section", "type": "context",
"text": { "elements": [
"type": "mrkdwn", {
"text": "*Game:* ${gamename}" "type": "image",
} "image_url": "${alerticon}",
"alt_text": "Alert Icon"
},
{
"type": "mrkdwn",
"text": "*Game:* ${gamename}"
}
]
}, },
{ {
"type": "section", "type": "section",
@ -95,11 +107,6 @@ json=$(cat <<EOF
"text": "*Message*\n${alertmessage} \n More info: ${alerturl}" "text": "*Message*\n${alertmessage} \n More info: ${alerturl}"
} }
}, },
{
"type": "image",
"image_url": "${alertimage}",
"alt_text": "${gamename}"
},
{ {
"type": "divider" "type": "divider"
}, },

Loading…
Cancel
Save