Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rojvv/rtwtrbt
A Twitter bot that retweets tweets matching a specific search rule.
https://github.com/rojvv/rtwtrbt
deno denoland twitter twitter-api twitter-bot
Last synced: 4 months ago
JSON representation
A Twitter bot that retweets tweets matching a specific search rule.
- Host: GitHub
- URL: https://github.com/rojvv/rtwtrbt
- Owner: rojvv
- License: wtfpl
- Created: 2022-07-24T15:45:40.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-03T07:25:31.000Z (over 2 years ago)
- Last Synced: 2024-10-06T08:38:26.507Z (4 months ago)
- Topics: deno, denoland, twitter, twitter-api, twitter-bot
- Language: TypeScript
- Homepage: https://twitter.com/DenoRetweeter
- Size: 24.4 KB
- Stars: 4
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rtwtrbt
> A Twitter bot that retweets tweets matching a specific search rule.
## Features
- Action logging
- Character, term and word blacklisting
- Catching up the tweets that were missed during downtime
- Instant retweets with a maximum delay of 20s between each retweet which is
only for not exceeding the API limits## Configuration
| 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](https://developer.twitter.com/en/docs/twitter-api/tweets/filtered-stream/integrate/build-a-rule)) |
| `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:1. Set your app's callback URL to the following:
```txt
http://127.0.0.1:3000/callback
```2. Run authenticate.ts:
```shell
deno run --allow-env --allow-net --allow-read authenticate.ts
```3. Visit http://127.0.0.1:3000/login.
4. Authenticate your account.
5. Copy the printed token in your console.
6. Run import.ts:
```shell
deno run import.ts
```7. 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.- The characters, words, and/or terms should be separated by `\n`.
- Each line is a regular expression that will make tweets not retweeted if they
match its text. Flags can be provided like this: `/regex/i`.## Running
```shell
deno run --allow-env --allow-net --allow-read --allow-write main.ts
```## License
0. You just DO WHAT THE FUCK YOU WANT TO.
[Read again](./LICENSE)