D
D
dicem2018-05-07 19:08:20
Node.js
dicem, 2018-05-07 19:08:20

How to process arbitrary Telegram data by a bot?

Hello.
There was a need to process arbitrary data entered by users through the telegram-bot-api for node js.
More specifically, there is the following logical chain for implementation:

Бот требует от пользователя ввести название записи (т.е. следующее сообщение от пользователя боту, введенное с клавиатуры будет восприниматься ботом как ввод данных на обработку)
=>
Создание записи с названием, введенным от пользователя.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Skibin, 2018-05-07
@dicem

bot.on('message', (msg) => {
//...
})

Only catch processing on a certain flag - when necessary

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question