fixed cat

This commit is contained in:
Helixu 2021-11-20 11:22:41 +00:00
parent 1290e21e35
commit c652d76d89

7
bot.py
View file

@ -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):