1.2.9 • Published 4 months ago

@reality.eth/farcaster-bot v1.2.9

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

Mastodon 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 the mastodon account create application section

{ "url": "...", "access_token": "...", }

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/mastodon-bot with npm install or from the top level of the repo with lerna bootstrap.

Initializing

cd packages/mastodon-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.9

4 months ago

1.2.8

4 months ago

1.2.7

7 months ago

1.2.6

7 months ago

1.2.3

7 months ago

1.2.2

7 months ago

1.2.1

7 months ago

1.2.0

7 months ago

1.1.2

8 months ago

1.1.1

8 months ago

1.1.0

8 months ago

1.0.79

8 months ago

1.0.78

8 months ago

1.0.77

8 months ago

1.0.76

8 months ago

1.0.75

8 months ago

1.0.74

8 months ago

1.0.73

8 months ago

1.0.72

8 months ago

1.0.71

9 months ago

1.0.70

9 months ago

1.0.69

10 months ago

1.0.68

10 months ago

1.0.67

10 months ago

1.0.66

10 months ago

1.0.65

10 months ago

1.0.64

10 months ago