diff --git a/konata.sh b/konata.sh index de46d5f..a5f4c74 100755 --- a/konata.sh +++ b/konata.sh @@ -50,10 +50,15 @@ alive(){ } cv(){ - stats=$(curl -sL corona.lmao.ninja/v2/countries/$args) + stats=$(curl -sL "corona.lmao.ninja/v2/countries/$args") country=$(jq -r '.country' <<< $stats) cases=$(jq -r '.todayCases' <<< $stats) - sendmsg "Today's COVID-19 cases for $country: $cases. Stay safe!" + if [ "$(jq -r '.message' <<< $stats)" != "null" ] + then + sendmsg "This country doesn't have any stats!" + else + sendmsg "Today's COVID-19 cases for $country: $cases. Stay safe!" + fi } id(){