Skip to content

PolishDom Bot is a multifunctional Telegram bot designed to help users learn the Polish language and prepare for obtaining the Karta Polaka (Polish Card).

Notifications You must be signed in to change notification settings

zerox9dev/polishdom_bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Polish Language Learning Bot 🇵🇱

A Telegram bot for learning Polish language with interactive features, language level testing, and a daily notification system for learning new words.

🌟 Key Features

  • Language Level Testing: Determine your current Polish language proficiency
  • Interview Trainer: Practice conversational Polish through interview simulation
  • Topic-based Word Learning: Subscribe to daily notifications with new words by chosen topics
  • AI Integration: Using AI for generating contextual examples and explanations
  • Smart Notifications: Notification system considering user-convenient time (9:00-21:00)

🛠 Tech Stack

  • Python 3.x
  • aiogram 3.0+ (Telegram Bot API)
  • MongoDB (via motor)
  • Pydantic for data validation
  • AI integration for content generation

📋 Prerequisites

  • Python 3.x
  • MongoDB
  • Telegram Bot Token
  • AI API key (for content generation)

🚀 Installation and Launch

  1. Clone the repository:
git clone <repository-url>
cd <project-directory>
  1. Create and activate virtual environment:
python -m venv .myenv
source .myenv/bin/activate  # for Linux/Mac
# or
.myenv\Scripts\activate  # for Windows
  1. Install dependencies:
pip install -r requirements.txt
  1. Create .env file based on .env.example and fill in the required variables:
TOKEN=your_telegram_bot_token
MONGODB_URL=your_mongodb_url
AI_API_KEY=your_ai_api_key
  1. Launch the bot:
python main.py

💬 Bot Commands

  • /start - Start working with the bot
  • /info - Get information about the bot
  • /test - Take a language level test
  • /interview - Start a practice interview
  • /word - Subscribe to words by chosen topic
  • /stopword - Unsubscribe from topic words

🔄 Notification System

The bot sends daily notifications with new words at a convenient time for the user:

  • Time range: 9:00 - 21:00
  • Random time within the selected range
  • Considers user's language level
  • Tracks learned words
  • Contextual usage examples

🗄 Project Structure

├── ai/                 # AI integration
├── db/                 # Database operations
├── handlers/           # Command handlers
├── states/             # Dialog states
├── utils/             # Helper functions
├── main.py            # Entry point
├── scheduler.py       # Notification scheduler
├── config.py          # Configuration
└── requirements.txt   # Dependencies

📝 License

MIT

👥 Authors

  • Project Developer
  • Contributors

🤝 Contributing

We welcome contributions to the project! Please create issues and pull requests.

Available Commands

  • /start - Start the bot and get welcome message
  • /info - Get detailed information about bot features
  • /interview - Start Polish Card interview preparation
  • /test - Take a language level test

📊 Database Structure

The project uses MongoDB with the following collection structure:

Users Collection

This collection stores user data and their learning preferences.

Field Type Description
user_id Integer Telegram user ID
username String Telegram username
language_level String Current Polish language level (e.g., "A1")
learned_words Array[String] List of words the user has learned
word_topics Array[String] Topics user is subscribed to for daily words
notifications_enabled Boolean Whether user wants to receive notifications
next_notification DateTime Scheduled time for next word notification

Example document:

{
    "user_id": 123456789,
    "username": "john_doe",
    "language_level": "A1",
    "learned_words": ["kot", "pies", "dom"],
    "word_topics": ["animals", "family"],
    "notifications_enabled": true,
    "next_notification": "2024-03-17T10:00:00Z"
}

About

PolishDom Bot is a multifunctional Telegram bot designed to help users learn the Polish language and prepare for obtaining the Karta Polaka (Polish Card).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages