Code Monkey home page Code Monkey logo

replying-twitterbot's Introduction

The twitterbot

This is a Twitterbot built with NodeJs that replies to mentions with a GIF.

It uses the Twitter Streaming API and the Giphy API.

(You will only need the Procfile if you want to deploy your bot to run by itself, e.g. using Heroku.)


Set up & run the bot

To run the bot, you need to install node js and a few modules:

(1) First make sure you have node installed. In your terminal, run:

$ node -v

(2) You will also need the node package manager (npm). Check:

$ npm -v

(3) Once node and npm are installed, you can use npm to install the required modules! Go into the directory of the Twitterbot and run:

$ npm install twit --save

$ npm install keyword-extractor --save

$ npm install gif-search --save

$ npm install download-file --save

(4) You will also need a Twitter developer account to use the Twitter API. Once you have this, you will be able to create a new app (the bot!) and get: consumer key, consumer secret, access token & access token secret.

Then just open the config.js file and edit these variables.

(5) Lastly, open the bot.js file and edit the username variable. This will be your bot's name (without the '@'), but there are further instructions inside the script.


Great! You should now be able to run the bot. From your command line, simply type:

$ node path-to-bot/bot.js


This code can be found on: https://github.com/AIessa/replying-twitterbot

replying-twitterbot's People

Contributors

aiessa avatar

Stargazers

Vlad avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.