title: Exclude replies from twitter streaming - tweepy
body: <p>I am pulling tweets from twitter's streaming api using tweepy. I'm then using this to autoreply to that user.</p>
  <p>For example if I want to pull live tweets from and then reply to Donald Trump I use:</p>
  <pre><code>import tweepy
  from tweepy import Stream
  from tweepy.streaming import StreamListener
  
  import json
  
  class StdOutListener(StreamListener):
      def on_data(self, data):
          clean_data = json.loads(data)
          tweetId = clean_data[&quot;id&quot;]
          tweet = &quot;YOUR MESSAGE HERE&quot;
          respondToTweet(tweet, tweetId)
  
  def setUpAuth():
      auth = tweepy.OAuthHandler(&quot;consumer_token&quot;, &quot;consumer_secret&quot;)
      auth.set_access_token(&quot;access_token&quot;, &quot;Access_token_secret&quot;)
      api = tweepy.API(auth)
      return api, auth
  
  def followStream():
      api, auth = setUpAuth()
      listener = StdOutListener()
      stream = Stream(auth, listener)
      stream.filter(follow=[&quot;25073877&quot;], is_async=True)
  
  def respondToTweet(tweet, tweetId):
      api, auth = setUpAuth()
      api.update_status(tweet, in_reply_to_status_id=tweetId, auto_populate_reply_metadata=True)
  
  if __name__ == &quot;__main__&quot;:
      followStream()
  </code></pre>
  <p>If you run my above code, you'll notice it does reply to Donald Trump, but also replies to all new replies to his tweets</p>
  <p>What do I need to add to exclude replies to his tweets from the stream?</p>
  <p>Thanks in advance for any help.</p>