Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addButton do not copy text and command #128

Open
Tommy4chan opened this issue Oct 11, 2023 · 0 comments
Open

addButton do not copy text and command #128

Tommy4chan opened this issue Oct 11, 2023 · 0 comments

Comments

@Tommy4chan
Copy link

Tommy4chan commented Oct 11, 2023

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

}
}
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant