Skip to content

sad/bnuuy

Repository files navigation

bnuuy

simple twitter bot using twitter-lite to tweet an image every hour.

setup

first, complete these preliminary steps to obtain api keys for your twitter account of choice.

then you can clone this repository and set up the bot.

$ git clone https://github.com/sad/bnuuy
$ cd bnuuy
$ yarn
$ mkdir pics pics-tweeted
$ cp .env.example .env

after this, fill out the .env file with your tokens, and move any images you have to the pics folder.

if you wish to change the frequency at which the bot tweets images, please edit the cron expression at the bottom which reads 0 * * * * by default. this site has examples of common crontab expressions.

you can stop the bot from moving tweeted images out of the pics folder by commenting out anywhere that setTweeted() is called.

once you're ready, you can run node src/bnuuy.js to start the bot. i recommend using pm2 to keep the bot running, and optionally start it when your system starts. after installing pm2 (yarn global add pm2), simply run the following command:

$ pm2 start ecosystem.config.js

this will start the bot and monitor for changes. see this page for information on having pm2 start the process automatically on boot.

About

🐰 simple image bot for twitter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published