Metadata-Version: 2.4
Name: ziyodev-tg-bot
Version: 0.3.0
Summary: Aiogram frameworkida yozilgan Telegram bot shabloni generatori
Author-email: Ziyodullo Aliyev <ziyodullodev@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/Ziyodullodev/telegram-bot-shablon-aiogram
Project-URL: Bug-Tracker, https://github.com/Ziyodullodev/telegram-bot-shablon-aiogram/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiogram>=3.18.0
Requires-Dist: python-dotenv>=1.0.1
Requires-Dist: aiofiles>=24.1.0
Dynamic: license-file

# Telegram Bot Template with Aiogram

This repository provides a template for building Telegram bots using the Aiogram framework in Python. It is designed to help you quickly start your bot development with a clean and modular structure.

## Features

- Asynchronous Telegram Bot API with Aiogram
- Modular code organization
- Database integration utilities
- Easy to extend with custom handlers and commands

## Installation

### Option 1: Install via PyPI (Recommended 🚀)

You can install this template generator directly from PyPI:

```bash
pip install ziyodev-tg-bot
```

Once installed, you can generate a new bot project anywhere with a single command:

```bash
ziyodev-tg-bot init my-new-bot
```

This creates a new folder `my-new-bot` containing all the template structure. Then, simply:

```bash
cd my-new-bot
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt
# Configure BOT_TOKEN and SECRET_KEY in src/.env
cd src
python manage.py migrate
python manage.py createsuperuser
python manage.py runbot
```

### Option 2: Clone from GitHub

1. Clone the repository:
   ```bash
   git clone https://github.com/Ziyodullodev/telegram-bot-shablon-aiogram.git
   cd telegram-bot-shablon-aiogram
   ```

2. Create venv and run:
   ```bash
   python -m venv venv
   source venv/bin/activate
   pip install -r requirements.txt
   cp src/.env.example src/.env
   # Configure BOT_TOKEN and SECRET_KEY in src/.env
   cd src
   python manage.py migrate
   python manage.py createsuperuser
   python manage.py runbot
   ```



## Configuration

Set your Telegram Bot Token in the environment or configuration file as needed.

## Running the Bot

Run the bot with:

```bash
cd src
python manage.py runbot
```

## Project Structure

- `src/` - Django Backend & Bot Application
  - `config/` - Django core configurations (`settings.py`, `urls.py`)
  - `users/` - Custom `User` model, migrations, and django admin settings
  - `bot/` - Aiogram Telegram Bot application
    - `management/commands/runbot.py` - Bot runner command
    - `handlers/` - Bot handlers and keyboards
    - `locales/` - Local JSON translation files synced dynamically via signals

## Contributing

Contributions are welcome! Feel free to fork and submit pull requests.

## License

MIT License

---

Happy bot building! 🚀
