A bot to interact with Boardroom's API and subscribe to new events.
There are two sets of commands: Commands to get general information and commands for subscriptions.
Subscriptions are run through every 30 seconds, but the checks are only done based on the frequency
argument. By default this is every 15 minutes.
This bot uses AWS DynamoDB to store the subscriptions, so the aws-cli
must be set up in the machine running it, with a table called subscriptions
and a primary key called id
. You can see a CDK example here.
The name of the table can be changed from the Dynamo service on this project.
The .env.example
can be used to create an .env
file which the token which is created on the Discord Developer Portal.
Once there's an .env
file, run the commands:
npm install
npm run tsc
node bot.js
Lists all protocols supported by Boardroom.
Lists all proposals in a protocol
Options:
cname
(required) - Code name for the protocol must be [a-z0-9] (e.g "uniswap")
Lists all voters in a protocol
Options:
cname
(required) - Code name for the protocol must be [a-z0-9] (e.g "uniswap")
Lists all voters in a protocol
Options:
refid
(required) - Unique code representing proposal (ends with =)
Retrieves information about a specific protocol.
Options:
cname
(required) - Code name for the protocol must be [a-z0-9] (e.g "uniswap")
Retrieves information about a specific proposal.
Options:
refid
(required) - Unique code representing proposal (ends with =)
Retrieves the votes of a specific address.
Options:
address
(required) - Address of the voter
Retrieves information about a voter.
Options:
address
(required) - Address of the voter
Prints Boardroom's global statistics.
Be notified any time a new protocol is added.
Options:
frequency
- How often to check (in hours). Default is 15 minutes (0.25)
Be notified any time a new proposal is added.
Options:
cname
(required) - Code name for the protocol must be [a-z0-9] (e.g "uniswap")frequency
- How often to check (in hours). Default is 15 minutes (0.25)
Be notified any time the state of a proposal changes.
Options:
refid
(required) - Unique code representing proposal (ends with =)frequency
- How often to check (in hours). Default is 15 minutes (0.25)
Be notified any time a proposal has a new vote.
Options:
refid
(required) - Unique code representing proposal (ends with =)frequency
- How often to check (in hours). Default is 15 minutes (0.25)
Be notified any time an address votes.
Options:
address
(required) - Address of the voterfrequency
- How often to check (in hours). Default is 15 minutes (0.25)
Display global statistics from time to time.
Options:
frequency
- How often to check (in hours). Default is 15 minutes (0.25)
Lists all active subscriptions, including their number which allows to delete them.
Delete a subscription
id
- Subscription unique identifir (uuid) which you can get from/show_all_subscriptions
.
Delete all subscriptions.