From c652d76d890d34fe1e0dd10471d807dc721b29b2 Mon Sep 17 00:00:00 2001 From: Helixu Date: Sat, 20 Nov 2021 11:22:41 +0000 Subject: [PATCH] fixed cat --- bot.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bot.py b/bot.py index d83993c..5f919c8 100755 --- a/bot.py +++ b/bot.py @@ -34,6 +34,13 @@ async def fox(ctx): file = File(io.BytesIO(await resp.read()),filename='fox.jpg') await ctx.send(random.choice(foxmsgs),file=file) +@bot.command(brief="cattttttttt") +async def cat(ctx): + async with aiohttp.ClientSession() as session: + async with session.get('https://some-random-api.ml/animal/cat') as resp: + json = await resp.json() + await ctx.send(json["fact"]) + await ctx.send(json["image"]) @bot.command(brief="gives you a fluffy panda") async def panda(ctx):