When I tried to use this function with InlineKeyboard to dynamically generate keyboard with CallbackType at setup. It will show me that text and command is alright when I try to view InlineKeyboard as JSON but actually it doesn`t work.
When I catch msg.callbackQueryData it shows that text of command is right but do not trigger CallbackType function
Code example which doesn't work
`
void generateRepeatingButtons(InlineKeyboard& keyboard, String wordBeginning, byte startIndex, byte endIndex, CallbackType fn)
{
for (byte i = startIndex; i < endIndex; i++)
{
String temp = wordBeginning + String(i);
keyboard.addButton(temp.c_str(), temp.c_str(), KeyboardButtonQuery, fn);
if (i % 2 == 1)
{
keyboard.addRow();
}
When I tried to use this function with InlineKeyboard to dynamically generate keyboard with CallbackType at setup. It will show me that text and command is alright when I try to view InlineKeyboard as JSON but actually it doesn`t work.
When I catch msg.callbackQueryData it shows that text of command is right but do not trigger CallbackType function
Code example which doesn't work
` void generateRepeatingButtons(InlineKeyboard& keyboard, String wordBeginning, byte startIndex, byte endIndex, CallbackType fn) { for (byte i = startIndex; i < endIndex; i++) { String temp = wordBeginning + String(i);
} } `