From 0bb02f967dd1e3a3dd13e3b5ca0c20d33d20c02c Mon Sep 17 00:00:00 2001 From: Helixu Date: Sat, 20 Nov 2021 10:50:36 +0000 Subject: [PATCH] added cat! --- bot.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bot.py b/bot.py index 9bff3c8..1f114a4 100755 --- a/bot.py +++ b/bot.py @@ -34,6 +34,14 @@ 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="cattttttt") +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):