#!/bin/bash
# URL as supplied in your slack bot
url=https://hooks.slack.com/services/{}/{}/{}
#JSON body
data='{"text": ":interrobang: Unable to do something"}'
sendError()
{
curl -X \
POST \
-H 'Content-type: application/json' \
--data $data \
$url
}
#Function that checks something
checkSomething
result=$?
#echo "result: $result"
if [ "$result" != "0" ]; then
sendError
fi
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)