B
B
bobrana2022-02-06 15:34:09
Python
bobrana, 2022-02-06 15:34:09

How to hide the keyboard immediately after a person has sent a message?

#КЛАВИАТУРА
    markup = types.ReplyKeyboardMarkup(resize_keyboard=True)
    item = types.KeyboardButton("\N{world map}")
    one_time_keyboard = TRUE

    markup.add(item)

    bot.send_message(message.chat.id, "чух-чух".format(message.from_user,bot.get_me()),
                     parse_mode='html', reply_markup=markup)

It seems that the button should display times, but it does not work. I want the button to disappear after the user clicks it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Markin, 2022-02-06
@bobrana

In markup add: It will be like this:one_time_keyboard=True

markup = types.ReplyKeyboardMarkup(resize_keyboard=True, one_time_keyboard=True)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question