There are code where I create a ReplyKeyboardMarkup and wanna hide id after click on button "Chat". How to do this? Without sending new message and delete her like: bot.send_message(mes.chat.id, "working", reply_markup=types.ReplyKeyboardRemove()) bot.delete_message(mes.chat.id, mes.message_id + 1)
code started with putting "/start":
def start_markup():
markup = types.ReplyKeyboardMarkup(resize_keyboard=True, row_width=2)
chat = types.KeyboardButton(text="Chat",)
markup.add(chat)
return markup
@bot.message_handler(commands=['start'])
def start(mes):
res = bot.send_message(mes.chat.id , "Chose what do u want", reply_markup=start_markup())
// at this point I already have to hide the reply keyboard
@bot.message_handler()
def get_message(mes):
if mes.text == "Chat":
markup = types.InlineKeyboardMarkup().add(types.InlineKeyboardButton(text='Click', url='...'))
bot.send_message(mes.chat.id, "Click!!!", reply_markup = markup)