Informs and populates information regarding DAO governance.
This project has kindly been supported and sponsored by:
git clone git@github.com:thanpolas/govbot.git
cd govbot
npm i
This project supports .env
file which is on .gitignore
for your convenience when developing on your local. Needed environment variables
can be found on .env-template
which you should copy to .env
and edit.
In coordination with the admins from snapshot, the snapshot webhooks need to POST to the following endpoint:
POST /snapshot-webhook
Follow this guide to get twitter tokens:
- From the account you want the tweets to happen apply for a Developer Account. This will take about a day and they might ask for followup questions.
- Once you have your developer account approved, go to the developer portal and create an application, do not mark down any keys or tokens at this step, just create the app.
- Once the app is created and you see it on your dashboard.
- On the Settings tab, scroll down to “User authentication settings”. Click Edit.
- Toggle on OAuth 1.0a, and in the OAuth 1.0a Settings section.
- Select your app permissions and make sure they are "Read and write".
- Go back to the Dashboard and click on the "key icon" (Keys and tokens).
- Regenerate your "consumer keys" and note both keys and values down in a safe and temporary document.
- Regenerate the "Access Token and Secret" and note both keys and values down in a safe and temporary document.
With the keys available, you now need to populate the following environmental variables:
TWITTER_CONSUMER_KEY=...
TWITTER_CONSUMER_SECRET=...
TWITTER_ACCESS_TOKEN=...
TWITTER_ACCESS_TOKEN_SECRET=...
Follow this guide to create your discord bot and get the tokens:
- Go to the developer portal: https://discord.com/developers/applications
- Create Application.
- Go to "Bot" Menu and add expected permissions.
- Go to "OAuth2" menu and select the "bot" scope.
- Copy the OAuth2 URL and paste it on the browser.
- Help on creating a bot: https://discordpy.readthedocs.io/en/latest/discord.html
With the bot token available, you now need to populate the following environment variable:
DISCORD_BOT_TOKEN
After you have invited the bot to your server, you need to get the id of the channel you wish the bot to relay the messages and set the following environment variable:
DISCORD_GOV_CHANNEL_ID
npm run db:reset:local
npm run knex:create_migration <name of migration>
npm run knex:migrate
Use the jest
command to run all tests or specific ones.
The tests will look for the NUKE_TEST_DB
environment variable to be set to
initiate the test database nuking and re-population, use it like so:
NUKE_TEST_DB=1 jest
When a new node version is available you need to updated it in the following:
/package.json
/.nvmrc
/.circleci/config.yml
Merge to main
, deployment will happen automatically to heroku via circleci.
Copyright © Thanos Polychronakis and Authors, Licensed under ISC.