forked from IPD/Foxtrot
Added fail message to fox command when it 413's
This commit is contained in:
parent
2288581903
commit
3e8e197eed
1 changed files with 9 additions and 1 deletions
8
bot.py
8
bot.py
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue