A Twitter bot that helps to stop misinformation on COVID-19 by replying to the keyword or phrase-specific tweets made by people in real time. By utilizing the Twitter API made for developers it listens to a stream of tweets through a set of rules which are defined in this code. Which help to parse tweets and targets those that deny Covid-19 and reply to them with links to correct information about Covid-19.
- Node.js version 16.13.0
- TypeScript support for Node.js version 17.0.1
- npm-package: twitter-api-v2
Goal is to fetch results of a filtered stream of tweets and reply to results with a post through the bot.
-
A twitter developer account is needed with required authentication to read and post tweets.
-
API: Twitter API v2
-
Auth: You will need an API key and secret as well as a BEARER token from Twitter API once you have signed up for a twitter developer account.
npm run buildcompile typescript to jsnpm run startcompiles js code and deploys the bot
- stream rules can be tweaked more for clearer tweet results
- make bot stop replying to itself
- re-tweet Covid-19 info to spread more awarness
- catch and resolve any errors encountered