import bottools.methods, dbtools, html, tweepy class BotStreamListener(tweepy.StreamListener): def __init__(self, bot, cid, ato, *args, **kwargs): tweepy.StreamListener.__init__(self, *args, **kwargs) self.bot = bot self.cid = cid self.ato = ato def on_status(self, status): bottools.methods.tweetMessage(status, self.cid, self.bot, notified = self.ato) def on_error(self, status): if status == 420: return False