Search code examples
javascriptnode.jsnpmtwitter

Get latest tweet from user_timeline with twit npm


I'm trying to create a discord bot with notification about new tweets.

I am using T.stream('statuses/filter', { follow : ['798934987978510337'] }); for this, but it show mentions too.

Can I get only tweets from user with twit?


Solution

  • No, the statuses/filter streaming API does contain retweets as well. You will need to filter out retweets in your own code if you do not want to pass them over to Discord.