Bug Report
Should hide keyboard reply buttons withremove_keyboard: true parameter.
Reply keyboard buttons are not hiding/removing with remove_keyboard: true
Set parameter for reply_markup --> remove_keyboard: true, answer to question with tapping on button, see that it is not disappearing.
My example which is not working:
reply_markup: {
remove_keyboard: true,
keyboard: [
[
{
text: "text"
}
],
[
{
text: "text"
}
]
]
}
};
It won't work with JSON.stringify object as well.
I don't think it's a bug, you should send a message with an empty keyboard with remove_keyboard: true once you get the result.
example
const optKeyboard = {
reply_markup: {
keyboard: [
[ {
text: "help",
}],
[{
text: "about"
}]
]}
}
};
const optRemove = {
reply_markup: {
remove_keyboard: true
}
};
bot.onText(/\/start/, (msg) => {
bot.sendMessage(msg.chat.id, "Please select one", optKeyboard)
});
bot.on('message', (msg) => {
if (msg.text.toString().toLowerCase() === 'help') {
bot.sendMessage(msg.chat.id,"This is a message that shows help and removes keyboard", optRemove);
} else if (msg.text.toString().toLowerCase() === 'about') {
bot.sendMessage(msg.chat.id, "The creator of the bot is ME, and remove keyboard", optRemove);
}
}
This is how you use remove_keyboard
Most helpful comment
I don't think it's a bug, you should send a message with an empty keyboard with
remove_keyboard: trueonce you get the result.example
This is how you use
remove_keyboard