forked from IPD/Foxtrot
fixed cat
This commit is contained in:
parent
1290e21e35
commit
c652d76d89
1 changed files with 7 additions and 0 deletions
7
bot.py
7
bot.py
|
@ -34,6 +34,13 @@ async def fox(ctx):
|
||||||
file = File(io.BytesIO(await resp.read()),filename='fox.jpg')
|
file = File(io.BytesIO(await resp.read()),filename='fox.jpg')
|
||||||
await ctx.send(random.choice(foxmsgs),file=file)
|
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")
|
@bot.command(brief="gives you a fluffy panda")
|
||||||
async def panda(ctx):
|
async def panda(ctx):
|
||||||
|
|
Loading…
Reference in a new issue