D
D
DimaWeb2017-02-07 15:23:03
Telegram
DimaWeb, 2017-02-07 15:23:03

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.
41b14b8b34d5470aa601fb95db36bc9d.png
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
      })
    };

Everything! But the bot still displays a keyboard with completely different answer options. It feels like he just remembered it and, regardless of the circumstances, displays it.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
DimaWeb, 2017-02-08
@DimaWeb

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.

L
Ly, 2017-02-08
@LyoSU

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

Y
Yurik Gagarin, 2021-03-08
@enerdzaiser

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 question

Ask a Question

731 491 924 answers to any question