I am trying to program a Twitter bot using Tweepy that will respond to new mentions. Currently, I am using the code:
class StreamListener(tweepy.Stream):
def on_status(self, status):
print("recieved tweet!")
main(status)
def on_error(self, status_code):
if status_code == 420:
return False
stream = StreamListener(consumer_key,
consumer_secret,
access_token,
access_secret)
stream.filter(follow=[user.id_str]) # the bot's user id
However, in my testing, the bot only responds to mentions that are in a single tweet. When I reply to a thread with a mention, the bot is silent. Is there a way for my bot to respond to mentions in a thread?