Answer the question
In order to leave comments, you need to log in
How to hide the keyboard in a bot?
Hello. I want to hide the regular keyboard after pressing it. I know how to do it, but in my case I don't. The fact is that when you click on the button, a message appears with an inline keyboard, so simply writing reply_markup=none will not work, since an inline keyboard is needed, but the usual keyboard is not hidden. How to do it?
if message.text == 'Текст': #текст обычной не инлайн кнопки
keyboard = types.InlineKeyboardMarkup(row_width=3)
nine = types.InlineKeyboardButton('⬅️Назад', callback_data='nine')
close = types.InlineKeyboardButton('↩️Скасувати', callback_data='close')
two = types.InlineKeyboardButton('➡️Вперед', callback_data='two')
keyboard.add(nine, close, two)
bot.send_photo(message.chat.id, '<file_id>', caption = 'Текст.', reply_markup=keyboard)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question