Reply only mentions, ignoring the replies of my original tweet #1577
-
I'm making a bot that answer all mentions. For find those mentions, I'm using this code:
The problem is: if I've already answered a mention and a random user answer this tweet, or answer the tweet that my bot was mentioned, the API consider it a mention. I want to ignore all the replies of my tweet and the replies of the tweet that I was mentioned, and consider just the first tweet as a mention. Is there an API method that I can use to do this? Or do I have to create a boolean function like 'is_not_reply(tweet)'? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You'll have to use one of the |
Beta Was this translation helpful? Give feedback.
You'll have to use one of the
in_reply_to_status_id
,in_reply_to_status_id_str
,in_reply_to_user_id
,in_reply_to_user_id_str
, orin_reply_to_screen_name
attributes of each Status/Tweet object and filter out replies yourself.