2
0
mirror of https://github.com/Nick80835/microbot synced 2025-08-30 14:08:31 +00:00
This commit is contained in:
Nick80835
2020-03-16 21:03:26 -04:00
parent 04b7d54faf
commit d77d7bed79

View File

@@ -4,12 +4,20 @@ import inspect
import io
from PIL import Image
from requests import get
from ubot.micro_bot import micro_bot
ldr = micro_bot.loader
@ldr.add(pattern="corona")
async def corona(event):
corona_data = get("https://corona.lmao.ninja/all").json()
response_text = f"`Cases: `**{corona_data['cases']}**\n`Deaths: `**{corona_data['deaths']}**\n`Recoveries: `**{corona_data['recovered']}**"
await event.reply(response_text)
@ldr.add(pattern="chatid")
async def chatidgetter(event):
if event.is_reply: