Make /cv more robust
Hello 2021! May you be better than last year :)
This commit is contained in:
parent
bdda6db5ee
commit
3e23671fd8
@ -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)
|
||||
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(){
|
||||
|
Loading…
x
Reference in New Issue
Block a user