1.2.9 • Published 6 months ago

@reality.eth/twitter-bot v1.2.9

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
6 months ago

Twitter bot

This script will tweet out new reality.eth questions and answers.

It does this by querying the graph endpoints specified in @reality.eth/contracts.

Setting it up

Make a file called secrets/config.json with the settings from dev.twitter.com

{ "consumer_key": "...", "consumer_secret": "...", "access_token": "...", "access_token_secret": "..." }

You should also make a directory called state which will store the files tracking how much has been tweeted out so far.

Install dependencies either from packages/twitter-bot with npm install or from the top level of the repo with lerna bootstrap.

Initializing

cd packages/twitter-bot

The script is run with

node index.js 1,100

...where 1 and 100 are the chains you wish to tweet about. You can add the chain ID of any other chain with a graph endpoint set in @reality.eth/contracts.

The first time a new chain is initialized it should be run with the init flag.

node index.js 1,100 init

This will create a state file for the chain at the current timestamp. You can edit this manually if you want to tweet some of the existing entries.

Running automatically

Make a cron, eg to run every second we use:

* * * * * cd /home/ed/monorepo-twitter/packages/twitter-bot && node index.js 1,100

Lock files

The script uses lock files under state to ensure only one process is trying to tweet about a given chain at a time. If something breaks and the lock file isn't deleted, you may need to delete this file manually.

1.2.0

9 months ago

1.2.8

6 months ago

1.2.7

8 months ago

1.2.6

8 months ago

1.2.3

8 months ago

1.2.2

9 months ago

1.2.1

9 months ago

1.0.66

11 months ago

1.0.65

11 months ago

1.0.69

11 months ago

1.0.68

11 months ago

1.0.67

11 months ago

1.0.73

10 months ago

1.0.72

10 months ago

1.0.71

11 months ago

1.0.70

11 months ago

1.0.77

10 months ago

1.0.76

10 months ago

1.0.75

10 months ago

1.0.74

10 months ago

1.0.79

9 months ago

1.0.78

9 months ago

1.1.1

9 months ago

1.1.0

9 months ago

1.1.2

9 months ago

1.2.9

6 months ago

1.0.60

1 year ago

1.0.55

1 year ago

1.0.54

1 year ago

1.0.53

1 year ago

1.0.52

2 years ago

1.0.59

1 year ago

1.0.58

1 year ago

1.0.57

1 year ago

1.0.56

1 year ago

1.0.51

2 years ago

1.0.50

2 years ago

1.0.48

2 years ago

1.0.49

2 years ago

1.0.47

2 years ago

1.0.39

2 years ago

1.0.38

2 years ago

1.0.40

2 years ago

1.0.44

2 years ago

1.0.43

2 years ago

1.0.42

2 years ago

1.0.41

2 years ago

1.0.46

2 years ago

1.0.45

2 years ago

1.0.33

3 years ago

1.0.32

3 years ago

1.0.37

2 years ago

1.0.36

3 years ago

1.0.35

3 years ago

1.0.34

3 years ago

1.0.26

3 years ago

1.0.29

3 years ago

1.0.28

3 years ago

1.0.27

3 years ago

1.0.30

3 years ago

1.0.22

3 years ago

1.0.25

3 years ago

1.0.24

3 years ago

1.0.23

3 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.21

3 years ago

1.0.20

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.2

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.1

4 years ago