Home

Awesome

rtwtrbt

A Twitter bot that retweets tweets matching a specific search rule.

Features

Configuration

VariableRequiredDescription
CLIENT_IDYesOAuth 2.0 Client ID
CLIENT_SECRETYesOAuth 2.0 Client Secret
APP_BEARERYesApp bearer token
RULEYesSearch rule (guide)
TAGYesSearch rule tag (e.g. Cool tweets)
LOG_DESTINATIONNoPath to log file

Note: You can also provide these environment variables in .env.

After setting the variables, you will have to get a user token for your automation account:

  1. Set your app's callback URL to the following:
http://127.0.0.1:3000/callback
  1. Run authenticate.ts:
deno run --allow-env --allow-net --allow-read authenticate.ts
  1. Visit http://127.0.0.1:3000/login.

  2. Authenticate your account.

  3. Copy the printed token in your console.

  4. Run import.ts:

deno run import.ts
  1. Provide the token and skip the lastId prompt.

Blacklisting

You can blacklist characters, words and/or terms so they are not retweeted. You can do this by placing the characters, words and/or or terms you want to blacklist inside a file called blacklist.txt in the directory you run from.

Running

deno run --allow-env --allow-net --allow-read --allow-write main.ts

License

  1. You just DO WHAT THE FUCK YOU WANT TO.

Read again