Skip to content

Latest commit

ย 

History

History
107 lines (75 loc) ยท 2.64 KB

File metadata and controls

107 lines (75 loc) ยท 2.64 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 ๐Ÿš€

  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:

# 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 ๐Ÿ

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.

โšก