twitools/twitools/streaming.py
Klaus-Uwe Mitterer 97958f2497 Add quote function
2017-03-24 13:08:47 +01:00

15 lines
391 B
Python

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