Skip to content

shavkat-dev/helpdeskbot

 
 

Repository files navigation

HelpDesk Bot (Enhanced Fork)

A modern, containerized, and multilingual Telegram bot that works as a reliable helpdesk, based on the original work by Júlia Rizza.

This is an enhanced and modernized fork of Júlia Rizza's original helpdeskbot. This version has been significantly refactored to serve as a robust, production-ready support channel for modern development teams.

When a user sends a support message to the bot, it forwards the message to a private support group. Your team can then reply directly to the forwarded message in the group, and the bot will relay the answer back to the user, handling all the routing seamlessly.

  1. The client talks to the bot.
    The client talks to the bot screenshot

  2. The company receives the message and replies to it.
    The company receives the message and replies it screenshot

  3. The client receives the answer, and the conversation continues.
    The client receives the answer screenshot

Key Features & Improvements

This fork builds upon the original concept with a focus on stability, maintainability, and user experience:

  • 🚀 Modern Tech Stack: Upgraded to Python 3.12 and the latest asynchronous versions of python-telegram-bot and redis libraries for improved performance and security.
  • 🐳 Fully Containerized: The entire application, including the Redis database, is managed via Docker and Docker Compose for simple, one-command setup and consistent, reproducible builds.
  • 💾 Persistent Storage: User support tickets are safely stored in a persistent Redis volume, ensuring that no conversations are lost even if the server reboots.
  • 🌐 Multilingual Support: Full localization support, pre-configured for English, Russian, and Portuguese. The bot defaults to Russian for new users.
  • ✨ Enhanced UX: A streamlined, command-less user flow. The onboarding and help messages are clear and instructive, making the bot incredibly intuitive to use.
  • 🐞 Bug Fixes: The critical bug related to Telegram's forwarding privacy settings has been resolved, guaranteeing that replies work for all users, regardless of their settings.

Installation & Usage

Prerequisites

1. Clone the Repository

Clone this repository to your local machine or server:

git clone git@github.com:shavkat-dev/helpdeskbot.git
cd helpdeskbot

2. Configure Your Bot

Create a .env file for your secrets by copying the template.

cp .env.template .env

Now, edit the .env file and add your secret tokens:

  • TELEGRAM_TOKEN: Get this from @BotFather on Telegram.
  • GROUP_CHAT_ID: The unique ID of the private Telegram group where support messages will be forwarded. Add a bot like @userinfobot to your group to find its ID.

3. Build and Run the Bot

Run the following command from the support-bot directory to build the Docker images and start the services in the background:

docker compose up --build -d

Your support bot is now running! The restart: always policy ensures that the bot and its database will automatically restart if they crash or if the system reboots.

Managing the Bot

  • Viewing Logs: To see the bot's live logs for debugging, run:
    docker compose logs -f bot
  • Stopping the Bot: To stop the services and remove the containers, run:
    docker compose down
    Note: This will not delete your persistent Redis data. To do that, run docker compose down -v.

Managing Dependencies

This project uses pip-tools to manage Python dependencies for reproducible builds.

  • The direct dependencies are listed in requirements.in.
  • The fully pinned dependency list is in requirements.txt.

To upgrade the libraries to their latest compatible versions, run:

# First, ensure pip-tools is installed
pip install pip-tools

# Then, run the upgrade command
pip-compile --upgrade

Afterward, commit the changes to both requirements.in and requirements.txt.

Acknowledgments

A special thanks to Júlia Rizza for creating the original helpdeskbot, which served as the foundation for this enhanced version.

About

A Python Telegram Bot that works as a helpdesk software.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 90.3%
  • Dockerfile 9.7%