AsyncTelegram2 icon indicating copy to clipboard operation
AsyncTelegram2 copied to clipboard

addButton do not copy text and command

Open Tommy4chan opened this issue 2 years ago • 0 comments

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();
}

} } `

Tommy4chan avatar Oct 11 '23 11:10 Tommy4chan