https://github.com/anandchowdhary/a11yisimportant
🐦 Twitter bot for @a11yisimportant × #a11y
https://github.com/anandchowdhary/a11yisimportant
bot twitter twitter-api twitter-bot typescript
Last synced: about 1 year ago
JSON representation
🐦 Twitter bot for @a11yisimportant × #a11y
- Host: GitHub
- URL: https://github.com/anandchowdhary/a11yisimportant
- Owner: AnandChowdhary
- License: mit
- Created: 2019-03-15T13:35:52.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-12-07T03:13:13.000Z (over 1 year ago)
- Last Synced: 2025-04-26T22:25:39.181Z (about 1 year ago)
- Topics: bot, twitter, twitter-api, twitter-bot, typescript
- Language: TypeScript
- Homepage: https://twitter.com/a11yisimportant
- Size: 3.75 MB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 57
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🐦 @a11yisimportant
[](https://travis-ci.org/AnandChowdhary/a11yisimportant)
[](https://coveralls.io/github/AnandChowdhary/a11yisimportant?branch=master)
[](https://github.com/AnandChowdhary/a11yisimportant/blob/master/LICENSE)
[](https://snyk.io/test/github/AnandChowdhary/a11yisimportant)

[](https://oswaldlabs.com/platform/)

[](https://npmjs.com/package/a11yisimportant)
[](https://twitter.com/a11yisimportant)
[@a11yisimportant](https://twitter.com/a11yisimportant) is a Twitter bot which follows smart people tweeting about #a11y and retweets mentions. Written in Typescript and hosted on [Oswald Labs Platform](https://oswaldlabs.com/platform/).
## ⭐ How it works
#### `/follow`
The follow endpoint follows users tweeting with the hashtag #a11y. It runs every hour, powered by [IFTTT](https://ifttt.com) and a webhook:
1. Find (mixed) tweets with hashtag #a11y
1. Like all those tweets
1. Make a list of users (unique)
1. Remove any users @a11yisimportant already follows
1. Follow everyone from this list
#### `/retweet`
The retweet endpoint retweets tweets that @a11yisimportant is tagged in. It runs every hour, powered by [IFTTT](https://ifttt.com) and a webhook:
1. Find (recent) tweets with mention @a11yisimportant
1. Remove any tweets written by self
1. Remove any tweets which are already retweeted
1. Like every tweet in this list
1. If this tweet is a reply, get the original tweet instead
1. Remove any duplicates (unique array)
1. Remove any "Thanks for the follow!" tweets
1. Retweet every tweet in this list
#### Interfaces
This package also exposes the following Typescript interfaces:
- `SearchResult` for the result from a standard search using the Twitter API
- `SearchMeta` for the metadata in a search result
- `User` for a user's profile
- `Tweet` for a tweet object
You can use them like this:
```js
import { Tweet } from "a11yisimportant/interfaces"
const tweet: Tweet = {
id_str: "1106516296085188609",
text: "Accessibility is important",
user: {
id_str: "1106514269758214144",
screen_name: "a11yisimportant"
}
// . . .
};
```
In each interface, longint strings are preferred since JavaScript natively doesn't support such large integers (e.g., `id_str` instead of `id`).
## 🛠️ Development
Install dependencies:
```bash
yarn
```
Compile Typescript to CommonJS before running the server:
```bash
yarn build
```
Run local server:
```bash
yarn start
```
## ✅ Todo
- [x] Auto follow
- [x] Auto retweet
- [x] Retweet CC original tweets
- [x] Like all mentions
- [x] Like all #a11y tweets
- [ ] Unfollow people who don't follow back
## 📝 License
MIT