Update /cv command
This commit is contained in:
parent
4a4cc233bb
commit
80bb3deceb
10
konata.sh
10
konata.sh
@ -94,9 +94,15 @@ cv(){
|
|||||||
fi
|
fi
|
||||||
if [ ! -z ${cv[1]} ]
|
if [ ! -z ${cv[1]} ]
|
||||||
then
|
then
|
||||||
pct=$(echo "scale = 2; ${cv[14]} / 10000" | bc)
|
pct(){ bc <<< "scale = 2; $1 / 10000"; }
|
||||||
sendmsg "Today's COVID-19 cases for ${cv[1]}: ${cv[4]} \($pct% of the population tested\). Stay safe!
|
sendmsg "*Today's COVID-19 stats for ${cv[1]}:*
|
||||||
|
Cases: ${cv[4]}
|
||||||
|
Active: ${cv[9]}
|
||||||
|
Total: ${cv[3]} \($(pct ${cv[11]})%\)
|
||||||
|
Tests: ${cv[13]} \($(pct ${cv[14]})%\)
|
||||||
|
|
||||||
Queried at $(date +'%Y-%m-%d %H:%M %Z').
|
Queried at $(date +'%Y-%m-%d %H:%M %Z').
|
||||||
|
Stay safe and get yourself vaccinated!
|
||||||
$updated"
|
$updated"
|
||||||
else
|
else
|
||||||
sendmsg "This country doesn't have any stats!"
|
sendmsg "This country doesn't have any stats!"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user