improve logging

This commit is contained in:
lickthecheese 2020-02-04 20:41:32 -05:00
parent 23a4f53e34
commit 9ce111c1ec
1 changed files with 5 additions and 3 deletions

8
bot.py
View File

@ -1,5 +1,5 @@
#!/usr/bin/env python3
import teambot, sys, os
import teambot, sys, os, traceback
class Circles(teambot.Handler):
def __init__(self, bot):
@ -40,9 +40,11 @@ class Circles(teambot.Handler):
try:
self.cmd[cmd](self,c,n,m)
except BaseException as e:
self.say(c,n+": Usage: "+self.help[cmd])
self.say(c,"Invalid Input, do {}help {} to see syntax".format(self.prefix, cmd))
print('error', e)
print(sys.exc_info())
n = sys.exc_info()
print(n, "Inp:", m)
traceback.print_tb(n[2])
try:
for i in self.raw:
self.raw[i](self,c,n,m)