A Discord bot that integrates with GitHub Projects to help teams manage and view project tasks directly from Discord.
Hosted via https://github.com/KellisLab/MantisAPI
This bot provides various Discord slash commands to help teams manage their workflow and projects. Key capabilities include:
- GitHub Integration: Seamlessly connect with GitHub Projects and organizational data
- Team Collaboration: Channel-based project management and task coordination
- AI-Powered Tools: Advanced features for productivity and automation
- Real-time Updates: Live data synchronization and notifications
The bot supports multiple slash commands for different functionalities. Use /help in Discord to see all available commands and their usage.
Feature-specific implementation and operator notes live with their packages:
members/README.mddocuments member profiles and the/member importCSV contract.teams/README.mddocuments the persistent team workflow.
uvfor local development (it installs the matching Python version)- Docker only if you prefer container-based development
- .env file provided by @DemonizedCrush
This repository uses Python 3.11 to match the Docker image. With uv
installed, create the local environment and install all dependencies:
uv venv --python 3.11 .venv
uv pip install --python .venv/bin/python -r requirements-dev.txtVS Code automatically uses .venv for Python analysis and terminals. Reload
the VS Code window if it was already open, then start the bot with automatic
restart on Python changes:
./scripts/dev.shYou can also run the VS Code task Run bot (hot reload) from the Command
Palette. Stop the bot with Ctrl+C.
Format the code and automatically fix lint issues with Ruff:
ruff format .
ruff check --fix .- Clone the repository
- Create your
.envfile with the required environment variables - Run with Docker Compose:
docker compose watchDocker Compose starts PostgreSQL, waits for it to become healthy, applies all
Alembic migrations, and then starts the bot. Database rows are kept in the
named postgres_data volume across container restarts.
- Clone the repository
- Install dependencies:
python -m pip install -r requirements.txt- Create your
.envfile with the required environment variables - Run the bot:
python bot.pyNo new environment variables are required for PostgreSQL. Docker Compose uses
an internal development database configuration, persists its data in the
postgres_data volume, and only exposes PostgreSQL on the host's loopback
interface. The existing .env continues to contain only the bot credentials.
When running Python outside Docker, the default connection in database.py
connects to this same PostgreSQL container on localhost:5432.
Apply migrations locally with:
alembic upgrade headCreate a new migration after changing a SQLModel table with:
alembic revision --autogenerate -m "describe the change"The reusable data-storage layer is in storage.py. Values are JSON objects
addressed by a namespace and key:
from database import get_session
from storage import get_value, set_value
with get_session() as session:
set_value(session, "reminders", "last-run", {"status": "complete"})
record = get_value(session, "reminders", "last-run")Please create a Pull Request for others to review your changes. We have a development bot in the Internal Discord Server. Please ask @DemonizedCrush for the bot token and the developer role in the Discord to test out your changes.