Improve exception printing through !eval and !exec
This commit is contained in:
parent
57a628f135
commit
e5f922d548
@ -7437,7 +7437,7 @@ if botconfig.DEBUG_MODE or botconfig.ALLOWED_NORMAL_MODE_COMMANDS:
|
|||||||
else:
|
else:
|
||||||
cli.msg(chan, a[:500])
|
cli.msg(chan, a[:500])
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
cli.msg(chan, str(type(e))+":"+str(e))
|
cli.msg(chan, repr(e))
|
||||||
|
|
||||||
@cmd("exec", owner_only=True, pm=True)
|
@cmd("exec", owner_only=True, pm=True)
|
||||||
def py(cli, nick, chan, rest):
|
def py(cli, nick, chan, rest):
|
||||||
@ -7445,7 +7445,7 @@ if botconfig.DEBUG_MODE or botconfig.ALLOWED_NORMAL_MODE_COMMANDS:
|
|||||||
try:
|
try:
|
||||||
exec(rest)
|
exec(rest)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
cli.msg(chan, str(type(e))+":"+str(e))
|
cli.msg(chan, repr(e))
|
||||||
|
|
||||||
@cmd("revealroles", flag="a", pm=True, phases=("day", "night"))
|
@cmd("revealroles", flag="a", pm=True, phases=("day", "night"))
|
||||||
def revealroles(cli, nick, chan, rest):
|
def revealroles(cli, nick, chan, rest):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user