Added fail message to fox command when it 413's

This commit is contained in:
Helixu 2021-11-24 17:30:00 +00:00
parent 2288581903
commit 3e8e197eed

8
bot.py
View file

@ -40,7 +40,15 @@ async def fox(ctx):
async with aiohttp.ClientSession() as session:
async with session.get('https://foxrudor.de/') as resp:
file = File(io.BytesIO(await resp.read()),filename='fox.jpg')
try:
await ctx.send(random.choice(foxmsgs),file=file)
except:
embed = discord.Embed(
title = "Command 'fox' failed",
description = "An error has occured with this command. This error is usually a 413 (Payload too large) and can be ignored."
)
return await ctx.send(embed = embed)
@bot.command(brief="give someone a cuddle")
async def hug(ctx, *, name=None):
if not name: