Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async def covid19(event: NewMessage.Event) -> None:
"""
Get the current COVID-19 stats for a specific country or overall.
`{prefix}covid` or `{prefix}covid USA India` or `{prefix}covid countries`
"""
covid = Covid(source="worldometers")
match = event.matches[0].group(1)
if match:
strings = []
failed = []
args, _ = await client.parse_arguments(match)
if match.lower() == "countries":
strings = sorted(covid.list_countries())
else:
for c in args:
try:
country = covid.get_status_by_country_name(c)
string = f"**COVID-19** __({country['country']})__\n"
string += covid_str % country
if country['critical']:
string += critical_str % country
strings.append(string)