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 β¦