D
D
DUDE2020-05-07 01:04:05
Python
DUDE, 2020-05-07 01:04:05

How to take what the user wrote in the telegram bot?

Hello. I ran into a little misunderstanding. Here I have an InlineKeyboard, there are all sorts of buttons on it, and each callback from the button is processed in a function with the callback_query_handler decorator, everything is standard.

What I need: when you click on a certain button of this keyboard, the bot should ask the user to enter a message and then do all sorts of indecent things with it. Of course, I understand that you can make some kind of flag through which you can do checks or something else, in principle there are crutches. I suspect that there is a more elegant option, who knows?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Krostelev, 2020-05-07
@stympel

If you are using telebot , then you need the register_next_step_handler mechanism

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question