Catch exception when the result of debug is too long
This commit is contained in:
parent
84baef2125
commit
650f1fa839
|
@ -56,8 +56,12 @@ class Owner:
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
await self.bot.say(python.format(type(e).__name__ + ': ' + str(e)))
|
await self.bot.say(python.format(type(e).__name__ + ': ' + str(e)))
|
||||||
return
|
return
|
||||||
|
try:
|
||||||
await self.bot.say(python.format(result))
|
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.command(pass_context=True)
|
||||||
@commands.check(utils.is_owner)
|
@commands.check(utils.is_owner)
|
||||||
|
|
Loading…
Reference in a new issue