J
J
judywb2020-09-10 10:47:54
Python
judywb, 2020-09-10 10:47:54

Why, when answering a question to a message, does 1 message come first, then the aiogram answer?

Code + photo of the chat below: When I send the number 1, it says: 1 message, which should not be displayed 2 response, which should

@dp.message_handler(content_types=types.ContentTypes.ANY)
async def all_other_messages(message: types.Message):
    await message.answer('1 или 2')
    if message.text.lower() == '1':
        await message.answer("Ответ: 1")
    elif message.text.lower() == '2':
        await message.answer("Ответ: 2")
    else:
        pass

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question