Answer the question
In order to leave comments, you need to log in
How to remove keyboard in telegram?
I am making a bot, while I figured out how to use reply_markup, I tried many options.
Now I have a problem that the old keyboard is constantly shown in the chat with the bot, I even have different answer options in the code, but it still shows the old options.
My buttons are taken by request from another server and then the array of buttons is displayed like this:
var options = {
reply_markup: JSON.stringify({
inline_keyboard: body.data
})
};
Answer the question
In order to leave comments, you need to log in
It's been a stupid situation. I deleted the bot and the delete conversation and added it back to my contacts and the problem went away. Perhaps the telegram client itself kept the old keyboard.
Most likely, when adding a new keyboard, an error occurs and Telegram simply cannot update it. In general, here's something to remove the keyboard https://core.telegram.org/bots/api#replykeyboardremove
I deleted the last message to which the keyboard was attached and everything was gone)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question