A twitter bot written in Typescript to check the most frequent words and sentiment analysis by a particular twitter user. Currently focused on English and Bahasa Indonesia.
- Reply to a tweet of the user that you want to analyze, and mention the user defined in the
TWITTER_ACCOUNT_TO_LISTEN
environment variable. - The account set with
TWITTER_API_KEY, TWITTER_API_SECRET_KEY, TWITTER_ACCESS_TOKEN_KEY, TWITTER_ACCESS_TOKEN_SECRET_KEY, TWITTER_BEARER_TOKEN
will reply to the your tweet with the information.
TWITTER_API_KEY=xxx
TWITTER_API_SECRET_KEY=xxx
TWITTER_ACCESS_TOKEN_KEY=xxx
TWITTER_ACCESS_TOKEN_SECRET_KEY=xxx
TWITTER_BEARER_TOKEN=xxx
TWITTER_ACCOUNT_TO_LISTEN=@sometwitterhandle
GOOGLE_API_TRANSLATE_TARGET_LANGUAGE=en
GOOGLE_APPLICATION_CREDENTIALS=google-application-credentials/credentials.json
HEALTHCHECK_PORT=3000
Notes:
- More info about
GOOGLE_API_TRANSLATE_TARGET_LANGUAGE
: https://cloud.google.com/translate/docs/languages - More info about
GOOGLE_APPLICATION_CREDENTIALS
: https://cloud.google.com/docs/authentication/getting-started - You can do a periodic healthcheck on this service by hitting the http://0.0.0.0:3000/status endpoint.
# development
$ npm run start:dev
# production mode
$ npm run build && npm run start