S
S
selfkilla6662020-06-21 06:38:37
Python
selfkilla666, 2020-06-21 06:38:37

How to get response from Aiogram user?

Waiting for a response message from the user is required:

@dispatcher.message_handler(commands = ['example'])
    async def example_command(message: types.Message):
        message.reply(text = 'Для выполнения этой функции вам нужны дополнительные аргументы:', reply = False)
        answer = await bot.await_answer() # <== Возвращает сообщение


(another example when the bot asks additional questions)

Telegram-Bots-6.png

Is there an analogue bot.register_next_step_handler()like from pyTelegramBotAPI in aiogram?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2020-06-21
@selfkilla

There is. State machine
https://github.com/aiogram/aiogram/blob/dev-2.x/ex...
https://surik00.gitbooks.io/aiogram-lessons/conten...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question