LA
lambda-fairy/nanojoshu
:robot: Twitter bot (cute)
nanojoshu
@nanojoshu (なの助手, Assistant Nano) is the name of my Twitter bot. This repository contains the code that runs it. Right now it has the following features:
- Sends a direct message whenever someone unfollows me on Twitter
Installation
-
Install Ruby and Bundler. The code has been tested on Ruby 2.3 and 2.4—other versions may work, but are not supported.
-
Run
bundleto install dependencies. -
Create a
.envfile with the following contents:TARGET_USER="..." TWITTER_CONSUMER_KEY="..." TWITTER_CONSUMER_SECRET="..." TWITTER_ACCESS_TOKEN="..." TWITTER_ACCESS_TOKEN_SECRET="..."
Put your screen name in
TARGET_USER(your personal handle, not the bot's).Fill out the remaining four fields with values from apps.twitter.com. Make sure you set permissions to "Read, Write and Access direct messages" before generating the tokens.
-
Start the bot with
./nanojoshu.
