Answer the question
In order to leave comments, you need to log in
How to make a telegram bot to reply to messages?
Hey! How can I make a telegram bot for a call center?
The meaning is this. The user writes a message and it is redirected to a regular telegram account.
In fact, people write to the bot, I read the messages and answer on behalf of the bot.
Answer the question
In order to leave comments, you need to log in
Better just make a bot, and then you will already screw the connectors to it for the necessary services.
First, try to write a simple bot using message-response mechanics, while you can set any filters on messages with if / else. The easiest way to do this is in Python with the pyTelegramBotAPI library (slippers can fly into me, but I started with this library and everything is pretty simple there). Install it like this:
pip install pytelegrambotapi
Or like this (with git from source):
$ git clone https://github.com/eternnoir/pyTelegramBotAPI.git
$ cd pyTelegramBotAPI
$ python setup.py install
@bot.message_handler(content_types=['text'])
def get_text_messages(message):
if message.text.lower() == 'привет':
bot.send_message(message.from_user.id, 'Привет!')
else:
bot.send_message(message.from_user.id, 'Не понимаю, что это значит.')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question