A Twitter bot that retweets tweets matching a specific search rule.
Variable | Required | Description |
---|---|---|
CLIENT_ID |
Yes | OAuth 2.0 Client ID |
CLIENT_SECRET |
Yes | OAuth 2.0 Client Secret |
APP_BEARER |
Yes | App bearer token |
RULE |
Yes | Search rule (guide) |
TAG |
Yes | Search rule tag (e.g. Cool tweets) |
LOG_DESTINATION |
No | Path 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:
http://127.0.0.1:3000/callback
deno run --allow-env --allow-net --allow-read authenticate.ts
Visit http://127.0.0.1:3000/login.
Authenticate your account.
Copy the printed token in your console.
Run import.ts:
deno run import.ts
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.
\n
./regex/i
.deno run --allow-env --allow-net --allow-read --allow-write main.ts