I want to create custom keyboard in telegram.bot
For example:
We have an array of string that gets from the database or other recurses
how we can push data from the array to InlineKeyboardMarkup
in for loop or function
//array of Button
string[] ButtonItem= new string[] { "one", "two", "three", "Four" };
//function or solution to create keyboard like this
var keyboard = new InlineKeyboardMarkup(new[]
{
new[]
{
new InlineKeyboardButton("one"),
new InlineKeyboardButton("two"),
},
new[]
{
new InlineKeyboardButton("three"),
new InlineKeyboardButton("Four"),
}
});