Add error logging and fix some things
This commit is contained in:
parent
08e34bdd94
commit
2aa2a60a2f
8
bot.py
8
bot.py
|
@ -1,4 +1,4 @@
|
|||
import teambot,tasks,rss,time,sys,subprocess
|
||||
import teambot,tasks,rss,time,sys,subprocess,re
|
||||
|
||||
class CosmicBot(teambot.Handler):
|
||||
def __init__(self,bot):
|
||||
|
@ -35,8 +35,8 @@ class CosmicBot(teambot.Handler):
|
|||
if (not self.commands[cmd]["is_admin"]) or (self.commands[cmd]["is_admin"] and is_admin):
|
||||
try:
|
||||
self.commands[cmd]["action"](channel,nick,*args)
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
print("access violation "+str(e))
|
||||
def on_botlist(self,channel,nick):
|
||||
self.say(channel,nick+": Maintainer: khuxkm@cosmic.voyage | Utility bot")
|
||||
def on_admin(self,channel,nick,subcmd,*args):
|
||||
|
@ -44,7 +44,7 @@ class CosmicBot(teambot.Handler):
|
|||
self.tasks.stop()
|
||||
self.tasks.save_state(0)
|
||||
self._bot.die("Stopping...")
|
||||
sys.exit()
|
||||
sys.exit(0)
|
||||
elif subcmd=="check":
|
||||
self.tasks.states[0] = self.check_rss(self.tasks.states[0],self.tasks.base_state)
|
||||
def on_roster(self,channel,nick,namecnt=""):
|
||||
|
|
Loading…
Reference in New Issue