Logo Lanfrica

YeiyoNathnael/ethchess-bot-tewdros

Domain:

natural language processing

Record type:

software
Creator:
Yei
Host:
This is Teddy Tewodros. The official club helper bot for ethchess club, addis ababa, ethiopia # ETHCHESS Bot β€” Tewodros β™ŸοΈπŸ€– A Telegram bot for the **ETHCHESS** chess club that facilitates Lichess chess games, retrieves player ratings, and provides AI-powered chat using Google Gemini. ## Features - **Chess Challenges** β€” Create open Lichess challenges directly from Telegram - Blitz (rated & unrated) - Bullet (rated & unrated) - Custom time controls - **Player Lookup** β€” Retrieve a Lichess user's bullet rating - **AI Chat** β€” Responds to mentions and replies using Google Gemini models - **Welcome Messages** β€” AI-generated greetings for new group members ## Bot Commands | Command | Description | |---|---| | `/start` | Introduce the bot and list available commands | | `/blitz` | Create an unrated blitz game (3+0) | | `/blitzr` | Create a rated blitz game (3+2) | | `/bullet` | Create an unrated bullet game (1+0) | | `/bulletr` | Create a rated bullet game (1+0) | | `/open x y` | Create a custom game (x = seconds, y = increment) | | `/user ` | Look up a Lichess user's bullet rating | ## Project Structure ``` . β”œβ”€β”€ main.go # Bot entry point, command handlers, Lichess challenge logic β”œβ”€β”€ go.mod # Go module definition β”œβ”€β”€ go.sum # Dependency checksums β”œβ”€β”€ Procfile # Heroku deployment config └── internal/ β”œβ”€β”€ gemini/ β”‚ └── gemini.go # Google Gemini AI integration └── lichess/ β”œβ”€β”€ getLichessUser.go # Lichess API user lookup └── userTypes.go # Lichess data structures ``` ## Prerequisites - Go 1.25.5 or later - A Telegram Bot Token - A Google Gemini API Key ## Setup 1. **Clone the repository** ```bash git clone github.com cd ethchess-bot-tewdros ``` 2. **Install dependencies** ```bash go mod download ``` 3. **Configure environment variables** Create a `.env` file in the project root: ```env TOKEN=your-telegram-bot-token GEMINI_API_KEY=your-google-gemini-api-key ``` 4. **Build and run** ```bash go build -o bin/ethchess-bot-te …