skip to Main Content

I need to remove the button from ReplyKeyboardMarkup. I search in Google very well.
The telebot library(PyTelegramBotAPI) is used.
Thank you in advance 🙂

2

Answers


  1. Use telebot.types.ReplyKeyboardRemove to remove keyboard

    from telebot.types import ReplyKeyboardRemove()
      
    @bot.message_handler(func=lambda message:True)
    def all_messages(message):
        if message.text:
            
            bot.send_message(message.from_user.id,"Done with Keyboard",reply_markup=ReplyKeyboardRemove())
    
    bot.infinity_pooling()
    
    Login or Signup to reply.
  2. You should use edit_message_reply_markup method to send a new set of buttons.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search