# TelegramSiteHelper
Telegram Bot and chat to create WebSite Helper (PHP+JS(JQuery2)+HTML+CSS)
Телеграм бот и чат для создания Чата-помощника на сайт
#Attention!
If you want new version of TelegramSiteHelper (each customet in new chatroom)
Please Twitter tweet:
`@telegram #telegramPleaseMakeBotPossibleToCreateGroup`
#Внимание!
Друзья, если вы хотите новый более удобный чат (с разделением менеджеров по чатам)
Пожалуйста сделайте tweet в Твиттере:
`@telegram #telegramPleaseMakeBotPossibleToCreateGroup`
[How to install and setup (english)](https://github.com/Surzhikov/TelegramSiteHelper/wiki/HOW-TO-INSTALL-(English))
[Как установить и настроить (по-русски)](https://github.com/Surzhikov/TelegramSiteHelper/wiki/%D0%9A%D0%90%D0%9A-%D0%A3%D0%A1%D0%A2%D0%90%D0%9D%D0%9E%D0%92%D0%98%D0%A2%D0%AC)
Donate by PayPal to andrey.surzhikov@gmail.com
Donate by YandexMoney 4100168691358
Donate by BTC 1HKb4L5YTQjcH6HYYEk1dXsuUWWmNYRkDj
Donate by Visa/Mastercard
The general scheme of ideas:
![](https://habrastorage.org/files/5fa/cc9/048/5facc9048483406ab0eba3820cce44fa.png)
That's how it happens:
1. Online users write to chat
2. Post it flies on your server
3. From there Telegram-bot sends it to the correct manager
4. The manager responds by Telegram
5. Bot sends a message back to chat
## Screenshot:
![](https://habrastorage.org/files/cbf/50e/458/cbf50e45825a48ce92b8eac34ba7d875.png)
## Requirement:
You must've Telegram Account. If you don't have make one using https://web.telegram.org/).
## Todo:
1. Download or clone this repo
2. Create a new bot. Add user @BotFather and follow this step to create a new bot
![](https://habrastorage.org/files/6de/a35/0f7/6dea350f710b4afe9c03f94702aecf49.png)
2. Edit configuration in «telegramSiteHelper/tbConfig.php»
3. Upload everything to your hosting/server/VPS
4. «telegramSiteHelper/tbServer.php» should run continuously, because it is a server. Add the cron job with a period of 1 every minute for this script. If the script fails, it will start again for a minute. It will be launched at the same time only one copy of the script.
5. Try!
6. Usage:
![](https://habrastorage.org/files/cbf/50e/458/cbf50e45825a48ce92b8eac34ba7d875.png)
* Add your bot to your contact list
* Enter your manager password
* Use command «/offline», «/online», «/exit»
## Minuses:
* Chat Who made "in haste" to start soon in the project. There are many loopholes, by which for example can be written in another chat room and peek's correspondence.
* Now, these problems do not disturb me, because chatting assistant site have been made to transfer important and sensitive information.
* When a manager and a lot of customers - can be confused whom to answer.
* ... I supplement of the comments
## Pros:
* It works!
* Free Forever and for any number of managers
* No need extra applications only telegrams, which is for all popular platforms
* You can rewrite and stylized chat as you want.
* Telegram is very fast
* ... I supplement of the comments
## What can be done:
* Foolproof and work on security
* Smart distribution system communications between managers (now the bot sends a random message to the manager)
* Automatic responses from the bot when the manager was silent for a long time
* Add a name and a photo manager that is responsible chatting
* ... I supplement of the comments
## In the plans:
* Admin panel with statistics
* Work through webhook