/100DaysOfCode-twitter-bot

Twitter bot for #100DaysOfCode

Primary LanguageJavaScriptBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

100DaysOfCode Twitter Bot

Greenkeeper badge

License (3-Clause BSD)

Helping Developers who code and participate in #100DaysOfCode share and communicate through Twitter.

Imgur

Bot Features

Retweet & Like a Tweet

Screenshot1

When Followed, automated reply to the user

Screenshot2

Congratulating user on starting/finishing #100DaysOfCode Challenge

Imgur

#100DaysOfCode tweet has negative sentiment, tweets back encouragement

Imgur

Tracks user interaction via LevelDB so users are encouraged once a day

Uses Cron job to tweet Project of the Day


Pre-requisites

This bot uses the twit npm package to manipulate tweets and streams and communicate with Twitter API. Please refer documentation to make substantial changes.

Contributing

You can help out by:

  • Solving existing issues
  • Enhancing the bot adding more functionalities (see issues)
  • Pointing out bugs/errors

For above option(s), please create an issue so it can be addressed. New to GitHub issues? They have a pretty handy guide you can use to familiarize yourself with them.

If You Can Make the Change

What you will need:

  • Your own Twitter account for testing your changes on
  • API Keys for Twitter and Sentiment
    • Get your Twitter API keys here
    • Get your Sentiment API key here
  • Fork the repository
  • Add API keys to .env file, your .env file should look something like this:
TWITTER_CONSUMER_KEY=xxxxxxxxxxxxxxxxxxxxdMhxg
TWITTER_CONSUMER_SECRET=xxxxxxxxxxxxxxxxxxxxkFNNj1H107PFv1mvWwEM6CZH0fjymV
TWITTER_ACCESS_TOKEN=xxxxxxxxx-xxxxxxxxxxxxxxxxxxxxecKpi90bFhdsGG2N7iII
TWITTER_ACCESS_TOKEN_SECRET=xxxxxxxxxxxxxxxxxxxxZAU8wNKAPU8Qz2c0PhOo43cGO
SENTIMENT_KEY=xxxxxxxxxxxxxxxxxxxx7Ev80Pacp1h0c2kjsnMVVrG5m9MNlF
QUERY_STRING=#someTestHashTag
TWITTER_USERNAME=YourTestTwitterAccountName
  • Change any hashtags to #someTestHashTag so as not to spam the community hashtag.
  • npm/yarn test the tests will check all keys are available before you start 👍
  • Make your suggested change.
  • Make sure the code style is in line with the existing code, run: npm run format to apply preferred formatting.
  • Create a pull request

License

BSD 3-Clause License

Copyright (c) 2017, freeCodeCamp. All rights reserved.