PaulSonOfLars/gotgbot

InlineKeyboardRow

svscorp opened this issue · 3 comments

Hi Paul,

I am wondering, how do you implement ReplyMarkup that has buttons not in a row, but under each other?

The below code places then one after another in a row.

InlineKeyboard: [][]gotgbot.InlineKeyboardButton{{
				{Text: "btn1", CallbackData: "data1"},
				{Text: "btn2", CallbackData: "data2"},
				{Text: "btn3", CallbackData: "data3"},
			}},

I am trying to find is there something like InlineKeyboardRow?

InlineKeyboard is a 2D array; first is the rows, second is the columns. Your example above is only adding to the columns. If you want more rows, move that up to the parent array. Does that make sense?

Makes sense, let me try that. I thought so it’s 2D array as it’s defined. Somehow overlooked. Sorry for the noise then - will self-close the issue after the check :)

All good. Thanks @PaulSonOfLars !