1
0
Fork 0
mirror of synced 2024-06-28 11:10:27 +12:00

Updated debug command to print an error

This commit is contained in:
Phxntxm 2016-08-01 10:28:16 -05:00
parent cce19493c1
commit 2e7906fd4a

View file

@ -46,6 +46,7 @@ class Owner:
@commands.check(checks.isOwner)
async def debug(self, ctx):
"""Executes code"""
try:
match_single = getter.findall(ctx.message.content)
match_multi = multi.findall(ctx.message.content)
if not match_multi:
@ -58,6 +59,8 @@ class Owner:
def r(v):
self.bot.loop.create_task(self.bot.say("```\n{}```".format(v)))
exec(match_multi[0])
except Exception as error:
await bot.send_message(ctx.message.channel, fmt.format(type(error).__name__, error))
@commands.command(pass_context=True)
@commands.check(checks.isOwner)