GitCord is an open-source Discord bot built with Python and FastAPI that connects GitHub events to Discord using webhooks.
- GitHub → Discord webhook integration
- FastAPI-based lightweight backend
- Easy deployment on any web service
- Environment-based configuration
git clone https://github.com/your-username/gitcord.git
cd gitcordpython -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env
Open .env and configure the required variables.
Follow the instructions inside .env.example to:
- Add your Discord Bot Token
- Add your Discord Webhook URL
- Configure your GitHub Webhook Secret
- Define separated users or role mappings (if applicable)
Start the FastAPI server:
uvicorn main:app --reloadBy default, the app runs at:
http://127.0.0.1:8000
You can deploy GitCord to any platform that supports Python and FastAPI, such as:
- Render
- Railway
- Fly.io
- Heroku
- DigitalOcean
- AWS / GCP / Azure
- Push your code to GitHub
- Create a new Web Service on your hosting platform
- Set the Start Command to:
uvicorn main:app --host 0.0.0.0 --port 8000- Add all environment variables from your
.envfile to your hosting provider’s environment settings - Deploy 🚀
- Go to your GitHub repository
- Navigate to Settings → Webhooks → Add Webhook
- Set the Payload URL to:
https://your-domain.com/webhook
- Select
application/json - Add your webhook secret (must match your
.envvalue) - Choose which events to send (e.g., push, pull request)
- Save
- ❌ Never commit your
.envfile - 🔐 Always use strong webhook secrets
- 🤖 Keep your Discord bot token private
- Python 3.10+
- FastAPI
- Uvicorn
- Discord Webhooks
- GitHub Webhooks
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.