I have a bot and when I start it, it sends a regular (non-inline) keyboard.
I use node-telegram-bot-api
It is processed something like this:
bot.on('message', msg => { const chatId = helper.getChatId(msg) switch (msg.text) { case kb.btn1: bot.sendMessage(chatId, 'Введи произвольное слово например и я выполню с ним определенные действия:') break case kb.btn2: bot.sendMessage(chatId, 'Введи другое произвольное слово и я выполню с ним немного другие действия, не те, что при нажатии на первую кнопку') break } }) I want to achieve this behavior so that when I click on the first button, a message Введи произвольное слово например и я выполню с ним определенные действия: user: Введи произвольное слово например и я выполню с ним определенные действия: actions and returned the result to the user.
When you send a bot new word - everything must be repeated.
So this should all work until the user presses another button.
When you click on another button, everything works much the same way, but the bot with the word performs other actions, not like when you press the first button.
How to do this?