1
0
Fork 0
mirror of synced 2024-06-22 16:20:23 +12:00

Catch exception when the result of debug is too long

This commit is contained in:
phxntxm 2017-03-04 01:51:30 -06:00
parent 84baef2125
commit 650f1fa839

View file

@ -56,8 +56,12 @@ class Owner:
except Exception as e:
await self.bot.say(python.format(type(e).__name__ + ': ' + str(e)))
return
await self.bot.say(python.format(result))
try:
await self.bot.say(python.format(result))
except discord.HTTPException:
await self.bot.say("Result is too long for me to send")
except:
pass
@commands.command(pass_context=True)
@commands.check(utils.is_owner)