I
I
i_ikigai2020-08-17 00:34:42
Python
i_ikigai, 2020-08-17 00:34:42

How in aiogram to make it so that after pressing the button, the keyboard opens with the button minimized?

Got a team

@dp.message_handler(commands='add_film')
async def name_film_for_users(message: types.Message, state: FSMContext):
    if message.text == 'Отмена':
        await message.answer('Что хочешь сделать?', reply_markup=kb.markup_start)
        await state.finish()
    else:
        await message.answer(text='Напишите название фильма', reply_markup=kb.markup_start_cancel)
        await Regis.next()
        await AddFilm.name.set()

And a button
btn_cancel = KeyboardButton(text='Отмена')
markup_start_cancel = ReplyKeyboardMarkup(resize_keyboard=True).add(btn_cancel)

After clicking on it, the bot asks for the name of the movie and displays the cancel button to return to the main menu, due to the fact that this button is there, the keyboard collapses, how to make the button collapse after pressing it, but it can be displayed by clicking on the corresponding button? If you use ReplyKeyboardRemove it just removes the button and the back button is removed.
What does it look like after clicking
Sa_IWeNAaYk.jpg
How do I make it look like this after the add_film command?
oo0gc0ho7vQ.jpg
Is this even possible in a telegram bot?
Sorry the pictures are huge

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2020-08-17
@SoreMix

No way. You can also roll yourself.
If you still need to leave it, you should look towards the inline buttons.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question