{"id":48830610,"url":"https://github.com/otabekoff/hangman-bot","last_synced_at":"2026-04-14T20:03:10.342Z","repository":{"id":318119088,"uuid":"1070042482","full_name":"otabekoff/hangman-bot","owner":"otabekoff","description":"Hangman game, now in Telegram bot.","archived":false,"fork":false,"pushed_at":"2025-11-23T19:43:23.000Z","size":627,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-23T21:13:58.279Z","etag":null,"topics":["bot","game","hangman","telegram"],"latest_commit_sha":null,"homepage":"https://t.me/HangmanUzBot","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/otabekoff.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-05T06:19:17.000Z","updated_at":"2025-11-23T19:43:26.000Z","dependencies_parsed_at":"2025-10-05T09:03:58.610Z","dependency_job_id":"8c4d8041-2b8c-44cd-a711-6abeafc1bad9","html_url":"https://github.com/otabekoff/hangman-bot","commit_stats":null,"previous_names":["otabekoff/hangman-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/otabekoff/hangman-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otabekoff%2Fhangman-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otabekoff%2Fhangman-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otabekoff%2Fhangman-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otabekoff%2Fhangman-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/otabekoff","download_url":"https://codeload.github.com/otabekoff/hangman-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otabekoff%2Fhangman-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31812977,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T18:05:02.291Z","status":"ssl_error","status_checked_at":"2026-04-14T18:05:01.765Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","game","hangman","telegram"],"created_at":"2026-04-14T20:02:57.796Z","updated_at":"2026-04-14T20:03:10.305Z","avatar_url":"https://github.com/otabekoff.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hangman Telegram Bot\n\nA fun Telegram bot implementation of the classic Hangman game using aiogram.\n\n![Bot Preview](./images/botpreview.png)\n\n## Features\n\n- 🌏 **Multilingual Support**: Full interface in 3 languages (English, Russian, Uzbek)\n- 🎮 **Classic Hangman Gameplay**: Guess the word letter by letter\n- 🖼️ **Visual Progression**: 8 hangman images showing your progress\n- ⌨️ **Language-Specific Keyboards**:\n  - English: A-Z alphabet (26 letters)\n  - Russian: Cyrillic alphabet (33 letters)\n  - Uzbek: Latin-based alphabet with `'` sign (26+1)\n- 📚 **CSV Word Database**: Organized words with categories for each language\n- 🎯 **Category Display**: See the category of the word you're guessing\n- 🔤 **Interactive Word Display**: Word letters shown as inline buttons\n- 🎭 **Session Management**: Clean message history for better UX\n- 💀 **Progressive Difficulty**: 7 wrong guesses before game over\n\n## Setup\n\n1. **Install dependencies:**\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n2. **Configure your bot token:**\n   - Create a bot using [@BotFather](https://t.me/botfather) on Telegram\n   - Copy the bot token\n   - Create a `.env` file in the project root and add your token:\n    ```\n    BOT_TOKEN=your_bot_token_here\n    ```\n    Example is given in `.env.example` file.\n\n3. **Prepare word files** (optional):\n   - The bot comes with pre-configured word files:\n        - `words-en.csv`,\n        - `words-ru.csv`,\n        - `words-uz.csv`\n   - You can add your own words in the format: `word,category`\n   - Each file should contain words in the respective language\n\n4. **Run the bot:**\n   ```bash\n   python hangman-bot.py\n   ```\n\n## How to Play\n\n1. **Start the bot**: Send `/start` to your bot on Telegram\n2. **Select language**: Choose your preferred language (English, Russian, or Uzbek)\n   - This sets both the interface language and the language of words to guess\n3. **Start a game**: Click the \"▶️ Play\" button or send `/play`\n4. **Guess letters**: Tap letters from the on-screen keyboard\n   - The word is displayed as inline buttons (revealed letters or *)\n   - Wrong guesses are tracked and shown\n   - The hangman image updates with each wrong guess\n5. **Win or lose**: Guess all letters before 7 wrong attempts to win!\n6. **End game early**: Tap the 🚫 button to stop the current game\n7. **Change language**: Use the \"🌐 Change Language\" button to switch languages\n\n## Commands\n\n- `/start` - Welcome message and language selection (first time) or main menu\n- `/play` - Start a new game with words in your selected language\n- `/help` - Show detailed help and game instructions\n- `/stop` - Stop the current game and reveal the word\n\n## Keyboard Layouts\n\n### English (26 letters + apostrophe + END)\n- Row 1: A B C D E F G\n- Row 2: H I J K L M N\n- Row 3: O P Q R S T U\n- Row 4: V W X Y Z ' 🚫\n\n### Russian (33 Cyrillic letters + apostrophe + END)\n- Row 1 (9): А Б В Г Д Е Ё Ж З\n- Row 2 (9): И Й К Л М Н О П Р\n- Row 3 (9): С Т У Ф Х Ц Ч Ш Щ\n- Row 4 (7+1): Ъ Ы Ь Э Ю Я ' 🚫\n\n### Uzbek (Latin-based with special characters)\n- Row 1: A B C D E F G\n- Row 2: H I J K L M N\n- Row 3: O P Q R S T U\n- Row 4: V W X Y Z ' 🚫\n\n## Game Rules\n\n- You have **7 wrong guesses** before the game ends\n- Each wrong guess progresses the hangman image\n- Guessed letters are tracked and displayed\n- Win by guessing all letters correctly before running out of attempts\n- Words are selected randomly from the language-specific CSV file\n- Each word has an associated category shown during gameplay\n\n## Image Progression\n\nThe bot uses 8 images to show the hangman progression:\n1. `blank.png` - Starting state\n2. `head.png` - After 1 wrong guess\n3. `head-torso.png` - After 2 wrong guesses\n4. `h-t-lh.png` - After 3 wrong guesses\n5. `h-t-hands-lf.png` - After 4 wrong guesses\n6. `h-t-hands.png` - After 5 wrong guesses\n7. `fresh-man.png` - After 6 wrong guesses\n8. `died-man.png` - Game Over (7 wrong guesses)\n\n## Project Structure\n\n```\nhangman-bot/\n├── hangman-bot.py      # Main bot code\n├── .env                # Bot token configuration (create this)\n├── requirements.txt    # Python dependencies\n├── README.md          # This file\n├── words-en.csv       # English words database\n├── words-ru.csv       # Russian words database\n├── words-uz.csv       # Uzbek words database\n└── images/            # Hangman progression images\n    ├── blank.png\n    ├── head.png\n    ├── head-torso.png\n    ├── h-t-lh.png\n    ├── h-t-hands-lf.png\n    ├── h-t-hands.png\n    ├── fresh-man.png\n    └── died-man.png\n```\n\n## CSV Word File Format\n\nEach language has its own CSV file with the following format:\n\n```csv\nword,category\nPYTHON,Programming\nTELEGRAM,Technology\nCOMPUTER,Technology\n```\n\n- **Header row**: `word,category`\n- **Data rows**: One word per line with its category\n- **Words**: Should be in UPPERCASE\n- **Encoding**: UTF-8 (important for Cyrillic and special characters)\n\n## Technologies Used\n\n- **Python 3.x**\n- **aiogram 3.13.1** - Modern async Telegram Bot API framework\n- **python-dotenv 1.0.1** - Environment variable management\n- **CSV module** - Word database management\n- **FSM (Finite State Machine)** - Game state management\n- **Inline \u0026 Reply Keyboards** - Interactive UI elements\n\n## License\n\nFree to use and modify for personal and educational purposes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotabekoff%2Fhangman-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fotabekoff%2Fhangman-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotabekoff%2Fhangman-bot/lists"}