Reputation: 1
hi i am trying to stream all @elonmusk's tweets using twitter API and send his tweets to my discord server.
currently i can stream tweets with the word 'meme' and send them to my discord server, here is my current code:
discordClient.on('ready', () => {
st.stream('meme', function(tweet){
const channel = discordClient.channels.cache.get('my discord server id');
channel.send(tweet.text);
});
});
but i don't know how to stream a user's tweets. please help me
Upvotes: 0
Views: 159
Reputation:
Use the follow
keyword. The documentation says this:
follow A comma-separated list of user IDs, indicating the users whose Tweets should be delivered on the stream. Following protected users is not supported. For each user specified, the stream will contain: Tweets created by the user. Tweets which are retweeted by the user. Replies to any Tweet created by the user. Retweets of any Tweet created by the user. Manual replies, created without pressing a reply button (e.g. “@twitterapi I agree”).
Upvotes: 0