This pull request adds the possibility to edit messages from the bot. Very usefull to change the layout of an InlineKeyboard without the necessity to send a new one.
Example usage
CTBotInlineKeyboard onKbd;
CTBotInlineKeyboard offKbd;
//setup
onKbd.addButton("ON", "ON", CTBotKeyboardButtonQuery);
offKbd.addButton("OFF", "OFF", CTBotKeyboardButtonQuery);
//loop
if (m.callbackQueryData.equals("ON")) {
digitalWrite(DIGITAL_PIN, HIGH);
bot.editMessageText(m.group.id, m.messageID, "My Switch", offKbd);
} else if (m.callbackQueryData.equals("OFF")) {
digitalWrite(DIGITAL_PIN, LOW);
bot.editMessageText(m.group.id, m.messageID, "My Switch", onKbd);
}
Description
This pull request adds the possibility to edit messages from the bot. Very usefull to change the layout of an InlineKeyboard without the necessity to send a new one.
Example usage