I
I
Ilyas2016-12-26 18:53:04
Python
Ilyas, 2016-12-26 18:53:04

How to implement a telegram bot correctly?

Hello, I started to study the creation of bots in the Telegram messenger.
I want to make a bot that will allow clients to write to it, and operators on behalf of this bot will respond to the right clients.
I tried to implement it in python using pyTelegramBotAPI , the point is that I collect the chat id of operators with a bot and the id of clients with a bot and a message forward, everything turns out to be extremely crooked.
So the question is actually this: what general concept should be used? Maybe somehow the channels need to be used in my case?
UPD: in general, I did this:
I collect the chat id of the operators and drive them into a dictionary, where the value of the chat id will be the chat id of the client that the operator will choose for himself with the command / chat_**********
If anyone has questions - write in the comments or email.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
WebDev, 2016-12-26
@id2669099

Create a bot, register a webhook. Save the chat id somewhere. Send a message to every chat. If many clients are expected, connect some rabbitMQ.

D
Dmitry Krymtsev, 2016-12-26
@krimtsev

It? https://github.com/Surzhikov/TelegramSiteHelper

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question