A specialized Discord bot that helps Deovuch administrators identify and verify Giveth projects that have received sufficient vouches from a specific organization on the DeVouch platform.
This Discord bot connects to both the DeVouch and Giveth APIs to provide real-time information about projects that have received a configurable minimum number of vouches but have not yet been verified. This tool streamlines the verification workflow for Deovuch administrators by automatically identifying projects that meet the vouch threshold criteria.
- Vouch Threshold Monitoring: Identifies Giveth projects that have received a minimum number of vouches from a specific organization
- Verification Status Checking: Filters for unverified projects that are active and meet the vouch criteria
- Formatted Discord Output: Presents results in a clean, formatted list with direct links to the projects on DeVouch
- Configurable Parameters: Customizable threshold, organization ID, and project limit via environment variables
This slash command retrieves a list of unverified and active Giveth projects that have received at least the specified number of vouches from the configured organization.
Parameters:
minimum-vouches
: The minimum number of vouches required (integer, minimum value: 1)
Example Output:
## Unverified & Active Projects with 3+ Vouches
The following projects have received enough vouches but are not yet verified:
- [Project Name 1](https://devouch.xyz/project/giveth/123?organization=0xf63f2a7159ee674aa6fce42196a8bb0605eafcf20c19e91a7eafba8d39fa0404=vouched)
- [Project Name 2](https://devouch.xyz/project/giveth/456?organization=0xf63f2a7159ee674aa6fce42196a8bb0605eafcf20c19e91a7eafba8d39fa0404=vouched)
The bot uses the following environment variables that can be configured by administrators:
Variable | Description | Default |
---|---|---|
DEVOUCH_TARGET_ORGANIZATION |
Organization ID to check vouches from | 0xf63f2a7159ee674aa6fce42196a8bb0605eafcf20c19e91a7eafba8d39fa0404 |
DEVOUCH_MIN_THRESHOLD |
Minimum number of vouches required | 3 |
DEVOUCH_PROJECTS_LIMIT |
Maximum number of projects to check | 150 |
GIVETH_PROD_URL |
Giveth GraphQL API endpoint | https://mainnet.serve.giveth.io/graphql |
DEVOUCH_PROD_URL |
DeVouch GraphQL API endpoint | https://optimism.backend.devouch.xyz/graphql |
The bot integrates with two external APIs:
-
DeVouch API: Queries for project attestations from a specific organization
- Endpoint:
https://optimism.backend.devouch.xyz/graphql
- Used to find projects with sufficient vouches
- Endpoint:
-
Giveth API: Retrieves detailed project information
- Endpoint:
https://mainnet.serve.giveth.io/graphql
- Used to check verification status and get project details
- Endpoint:
- The bot queries the DeVouch API for project attestations from the configured organization
- It filters for projects with enough vouches to meet the threshold
- For each qualifying project, it checks the Giveth API for verification status
- It collects unverified, active projects and presents them in a formatted list
- The results are sent as Discord messages with links to the projects
- Discord server with administrator permissions
- Bot added to your server with appropriate permissions
- Request the bot invite link from the development team
- Click the link and select your Discord server
- Ensure the bot has permissions to:
- Send messages
- Use slash commands
- Read message history
-
Clone the repository
git clone <repository-url> cd discord-bot-ts
-
Install dependencies
yarn install
-
Create and configure the
.env
file (see Configuration section)cp .env.example .env # Edit .env with your values
-
Build and start the bot
yarn build yarn start
-
Clone the repository
git clone <repository-url> cd discord-bot-ts
-
Create and configure the
.env
file (see Configuration section)cp .env.example .env # Edit .env with your values
-
Build and start the Docker container
docker-compose up -d
-
View logs
docker-compose logs -f
-
Stop the container
docker-compose down
A convenience script deploy.sh
is included to simplify Docker operations:
-
Make the script executable (first time only)
chmod +x deploy.sh
-
Available commands:
# Build and start containers ./deploy.sh --build # View logs ./deploy.sh --logs # Restart containers ./deploy.sh --restart # Stop containers ./deploy.sh --stop # Show help ./deploy.sh --help
-
Clone the repository
git clone <repository-url> cd discord-bot-ts
-
Create and configure the
.env
file -
Build the Docker image
docker build -t devouch-discord-bot .
-
Run the Docker container
docker run -d --name devouch-discord-bot --env-file .env devouch-discord-bot
- No projects found: Check if the minimum threshold is set too high or if there are no unverified projects
- API errors: Ensure the DeVouch and Giveth APIs are accessible and the endpoints are correctly configured
- Bot not responding: Verify the bot is online and has proper permissions in your Discord server
- Container exits immediately: Check logs with
docker logs devouch-discord-bot
to identify the issue - Environment variables not loaded: Ensure your
.env
file is properly formatted and mounted - Health check failing: The bot includes a health check endpoint at port 8080. You can check the status with
curl http://localhost:8080/health
A monitoring script is included to check if the bot is running properly:
-
Make the script executable:
chmod +x monitor.sh
-
Run the monitoring script manually:
./monitor.sh
-
Set up a cron job for regular monitoring (example: check every 15 minutes):
# Open crontab editor crontab -e # Add this line */15 * * * * /path/to/discord-bot-ts/monitor.sh >> /path/to/discord-bot-ts/logs/monitor.log 2>&1
For additional support or to report issues, please contact the development team.
MIT