diff --git a/lgsm/functions/alert_telegram.sh b/lgsm/functions/alert_telegram.sh index 4bdd4e0d7..71a77b865 100644 --- a/lgsm/functions/alert_telegram.sh +++ b/lgsm/functions/alert_telegram.sh @@ -19,7 +19,7 @@ EOF fn_print_dots "Sending Telegram alert" sleep 0.5 -telegramsend=$(curl -sSL -H "Content-Type: application/json" -X POST -d """${json}""" "https://api.telegram.org/bot${telegramtoken}/sendMessage") +telegramsend=$(curl -sSL -H "Content-Type: application/json" -X POST -d """${json}""" "https://api.telegram.org/bot${telegramtoken}/sendMessage" | grep "error_code") if [ -n "${telegramsend}" ]; then fn_print_fail_nl "Sending Telegram alert: ${telegramsend}"