Answer the question
In order to leave comments, you need to log in
How to remove a button in a Telegram bot if the user has not clicked on it?
Hello, I ask the user a question, but he may not answer it by pressing the skip button, and if he still answered the question, then the button remains. How can I remove it when sending the next message?
This is how I send a message with a question:
bot.sendMessage(id, `Введите телефон:`, {
reply_markup: {
resize_keyboard: true,
one_time_keyboard: true,
keyboard:
}
})
Answer the question
In order to leave comments, you need to log in
In response to a sent message, its message_id comes. Save it and when the next message comes send a blank keyboard for that message_id
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question