A Telegram bot to track wins, losses, and statistics in your EDH/Commander Magic: The Gathering pods!
- Create and manage multiple EDH pods
- Track game outcomes (wins, losses, draws)
- Record player eliminations and kill counts
- View player statistics per pod and overall
- Simple and intuitive conversation-based interface
- Persistent SQLite database storage
- Visual stat cards showing top performers
- Multiple ranking options (win rate, total wins, kills, games played)
- Time-based filtering (past week or all-time)
- Automatic weekly roundups sent to each pod
- Customizable player avatars
- Per-pod statistics tracking
- Stats
- Win rate
- Total wins/losses
- Kill count
- Games played
- Track game winners and losers
- Record player eliminations
- Support for multiple pods
- Historical game lookup
/start
- Get started with the bot/profile
- View your player profile and statistics/game
- Start recording a new game/history
- View game history/pod
- Create or manage pods/leaderboard
- View pod leaderboard with stats and rankings
- Clone the repository:
git clone https://github.com/yourusername/edh-telegram-bot.git
cd edh-telegram-bot
- Install dependencies using Poetry:
poetry install
- Create a
.env
file with your Telegram bot token:
TELEGRAM_BOT_TOKEN=your_bot_token_here
Alternatively, use the dev-container provided in this repository to run the bot locally.
- Activate the Poetry environment:
poetry shell
- Run the bot:
python main.py
telegram_bot/
conversations/
- Conversation handlers for interactive commandshandlers/
- Command handlersmodels/
- Data models and game logicstrategies/
- Reply and error handling strategiesstats/
- Statistics calculation and leaderboard generationimage_gen/
- Image generation for stat cardsscheduled_tasks/
- Automated tasks like weekly updates
- Python 3.11+
- python-telegram-bot[job-queue] 21.10+
- python-dotenv 1.0.0+
- SQLAlchemy 2.0.0+
- Pillow 11.1.0+
This project is licensed under the MIT License - see the LICENSE file for details.
0xEljh ([email protected])
Any contributions are welcome!
- More detailed statistics and analytics
- Editable player profiles
- Ability to delete/edit games
- Enhanced visualization options