Skip to content

Latest commit

Β 

History

History
151 lines (105 loc) Β· 3.3 KB

File metadata and controls

151 lines (105 loc) Β· 3.3 KB

Telegram Support Bot πŸ€–

Python Version License: MIT

A simple Telegram bot solution for managing user support requests through forum-style chats. Facilitates seamless two-way communication between users and support agents.

Key Features ✨

  • Thread-Based Organization
    Automatically creates dedicated forum threads for each user conversation

  • Bi-Directional Messaging
    Enables real-time communication between users and support agents

  • Persistent Conversation Mapping
    Maintains user-thread relationships across sessions

  • Customizable Interface
    Configure welcome messages and error responses

  • Multi-Language Support
    Currently supports Russian and English localization

Prerequisites πŸ“‹

  • Python 3.13 or newer
  • Telegram bot token (obtain from @BotFather)
  • Forum-enabled Telegram group for support team

Installation πŸš€

Docker 🐳

  1. Clone repository:
git clone https://github.com/fraybyl/telegram-support-bot.git
cd telegram-support-bot
  1. Configure environment:
nano docker-compose.yml

Manually

  1. Clone repository:
git clone https://github.com/fraybyl/telegram-support-bot.git
cd telegram-support-bot
  1. Create virtual environment:
python -m venv venv
  1. Activate virtual environment:
# Unix/macOS
source venv/bin/activate

# Windows
venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Configure environment:
cp .env.example .env

Configuration βš™οΈ

Edit .env file with your credentials:

Docker 🐳

nano docker-compose.yml
# REQUIRED PARAMETERS
BOT_TOKEN=your_bot_token_here
SUPPORT_CHAT_ID=-123456789  # ID of your forum-style support chat
APP_LANG=en  # Interface language (en/ru)

# OPTIONAL CUSTOMIZATIONS
ENABLE_START_COMMAND=true   # Enable /start command handler
WELCOME_MESSAGE=How can we assist you today?  # Custom greeting

Manually

# REQUIRED PARAMETERS
BOT_TOKEN=your_bot_token_here
SUPPORT_CHAT_ID=-123456789  # ID of your forum-style support chat
APP_LANG=en  # Interface language (en/ru)

# OPTIONAL CUSTOMIZATIONS
ENABLE_START_COMMAND=true   # Enable /start command handler
WELCOME_MESSAGE=How can we assist you today?  # Custom greeting

Launching the Bot 🏁

Docker 🐳

docker compose up -d

Manually

python main.py

Operational Guide πŸ“–

  1. Bot Setup

    • Add bot to your forum-enabled support group
    • Grant administrator privileges to the bot
  2. User Interaction

    • Users initiate conversations via direct messages to the bot
    • Each user gets a dedicated thread in your support forum
  3. Support Workflow

    • Agents respond within user-specific threads
    • All thread messages get forwarded to the respective user
    • Telegram based conversation history within forum threads

License πŸ“„

This project is licensed under the MIT License - see the LICENSE file for details.


Need Help?
For feature requests or bugs, please open an issue.