I need to create a menu using inlineKeyboard from an array of "n" element that can change in value and number. I'm working with telegraf API and this is how i create a static one:
const bookMenu = Telegraf.Extra
.markdown()
.markup((m) => m.inlineKeyboard([[
m.callbackButton('book1', 'book1-callback'),
m.callbackButton("book2", "book2-callback")],
[m.callbackButton("book3", "book3-callback")]
//.....
//for n buttons
//.....
]))
How can i do that? I couldn't manage to do a for cycle inside markup