Skip to content

Twitter bot that retweets and retorts based on phrases.

Notifications You must be signed in to change notification settings

bws9000/esb2

 
 

Repository files navigation

Change log

v1.0

  • Added reply function based on a phrase.

what isn't here yet

eat-shit-bot

Lmao

This is a twitter bot to retweet people who use a certain phrase. Currently, that phrase is "eat shit".

How it works

To run, you need to create a credentials.js file, similar to the credentials.example.js file but with actual twitter credentials in it. Then, just:

$ node app.js

and your twitter bot should run.

In the wild

Check it out on Twitter

On a server

To run this on a server (I'm running on digital ocean), there's two ways you can do this. You can daemonize the process manually, or you can use pm2 to do this for you.

pm2

Install pm2 with

npm install -g pm2

Then cd to the directory where you've placed this app, and run pm2 start app.js. You can find more details for how to use pm2 here.

Manually daemonize

To manually daemonize the process, do $ cd /etc/systemd/system. You'll be using systemd. Create a .service file, like eatshitbot.service. This should look something like this:

[Unit]
Description=Job that runs the twitter eat shit bot

[Service]
Type=simple
ExecStart=/usr/bin/nodejs /root/whatever/eat-shit-bot/app.js

[Install]
WantedBy=network-online.target

After creating that file, you'll need to reload, $ systemctl daemon-reload, and then start the daemon: $ systemctl start eatshitbot (or enable it, which will have it always run even if you exit out of ssh: $ systemctl enable eatshitbot.service).

To make sure this is working, do $ systemctl status eatshitbot.service. You can restart the service by doing $ systemctl restart eatshitbot.service.

Here's a cheatsheet.

About

Twitter bot that retweets and retorts based on phrases.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 78.0%
  • CSS 11.2%
  • HTML 10.8%