spences10 / twitter-bot-bootstrap

Twitter bot bootstrap :boot: using node and twit :bird:
https://medium.freecodecamp.com/easily-set-up-your-own-twitter-bot-4aeed5e61f7f#.dw898leyj
MIT License
231 stars 104 forks source link

isReply helper function #126

Closed nikkilr88 closed 7 years ago

nikkilr88 commented 7 years ago

I am still pretty new at this... Is this what you were looking for?

nikkilr88 commented 7 years ago

https://github.com/spences10/twitter-bot-bootstrap/blob/fc307eea5faac36c00a4e96617bd64df37332b0f/src/api/retweet.js#L31

Would that be an if statement inside of your try block then?

spences10 commented 7 years ago

I think if we get rid of the try and use the isReply function in an if it should do the trick, you think?

spences10 commented 7 years ago

Closes #120

spences10 commented 7 years ago

Ok, looks great, you tested this on your own bot I presume @nikkilr88? 🙏 👍

nikkilr88 commented 7 years ago

@spences10 Yes, my bot uses the isReply function, and so far everything is running smoothly. It filters out retweets and quoted tweets.

spences10 commented 7 years ago

Brilliant, thank you ❤️

nikkilr88 commented 7 years ago

@spences10 Thank you! This was my first PR that actually involved code. It was a great learning experience.

spences10 commented 7 years ago

Thank you for the contribution 👍

I'll get the contributor's file updated now, please feel free to make any suggestions + improvements you think may help other people trying this out.

I have found that this is a nice entry level project for people to try

Many thanks 👌