A Telegram bot that acts as the official community agent for Zo House — a network of hacker houses and builder spaces. This bot helps surface new projects, track contributor activity, and reward participation in the Zo House builder community.
- Enable users to:
- Nominate fellow builders for shoutouts
- View project links, Builder Scores, and contributor profiles
- Day-to-day commands:
/start- Setup their builder profile/help- List all available commands/profile- View your profile information and Builder Score/nominate @username- Nominate a fellow builder for recognition/score- Check your Builder Score/leaderboard- View the top builders in the community
- Integrate with the Zo House GitHub repository:
- Announce new commits, pull requests, and issues in Telegram
- Attribute GitHub activity to contributors (via GitHub username)
- Include GitHub contributions in Builder Score logic
- Assign each member a Builder Score based on:
- GitHub activity (commits, PRs, issues)
- Nominations and engagement within Telegram
- Allow users to check scores via
/scoreor/profile
- Show top builders in a
/leaderboardcommand - Display wallet + score in public profile
- Automatic onboarding for new members
- Weekly recap posts highlighting community achievements
- Telegram Bot API
- Bot Framework: python-telegram-bot
- GitHub webhooks for real-time updates
- Database: MongoDB
- Python 3.8+
- Telegram Bot token (from BotFather)
- GitHub webhook secret
- MongoDB database
- Public URL endpoint for webhook (for GitHub integration)
Create a .env file with the following variables:
TELEGRAM_TOKEN: Your Telegram bot token from BotFatherTELEGRAM_GROUP_ID: ID of the Telegram group where the bot will operateGITHUB_WEBHOOK_SECRET: Secret for verifying GitHub webhooksMONGODB_URI: Connection string for MongoDBMONGODB_DB: MongoDB database name
- Clone the repository
git clone https://github.com/your-org/zo-builder-bot.git
cd zo-builder-bot- Install dependencies
python3 -m venv .venv #or python -m venv .venv
pip install -r requirements.txt- Configure environment variables
cp .env.example .env
# Edit .env with your configuration values- Run the main bot
python bot.py- Run the webhook server (in a separate terminal or process)
uvicorn webhooks:app --reload- Go to your GitHub organization settings
- Navigate to "Webhooks" and click "Add webhook"
- Set the Payload URL to your
WEBHOOK_URLvalue - Set Content type to "application/json"
- Enter your
GITHUB_WEBHOOK_SECRETvalue - Select events to trigger the webhook:
- Pull requests
- Issues
- Issue comments
- Push events
- Ensure the webhook is active and click "Add webhook"