How do you remove reply keyboard without sending a message in Telegram?

冷暖自知 提交于 2019-12-11 07:29:06

问题


In Telegram bot you can send a message with the reply keyboard using the sendMessage method.

The keyboard is getting displayed instead of normal qwerty one.

We can remove the displayed keyboard by sending another message and by passing ReplyKeyboardRemove object with it. However, this requires some extraneous message to be sent.

Is it possible to remove the keyboard without actually sending any real message?

I'm aware of one_time_keyboard option, but it will only hide the keyboard without removing it.


回答1:


You could edit the message using editMessageText or editMessageReplyMarkup and simply not pass a reply_markup to make it disappear.



来源:https://stackoverflow.com/questions/48120494/how-do-you-remove-reply-keyboard-without-sending-a-message-in-telegram

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!