mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-03 15:19:30 +00:00
fix of #761
This commit is contained in:
@@ -49,6 +49,19 @@ inline fun flatInlineKeyboard(
|
||||
block: InlineKeyboardRowBuilder.() -> Unit
|
||||
) = inlineKeyboard { row<InlineKeyboardButton>(block) }
|
||||
|
||||
/**
|
||||
* Factory-function for [InlineKeyboardBuilder]. It will [apply] [block] to internally created [InlineKeyboardMarkup]
|
||||
* and [InlineKeyboardBuilder.build] [InlineKeyboardMarkup] then
|
||||
*
|
||||
* @see InlineKeyboardBuilder.row
|
||||
*/
|
||||
inline fun InlineKeyboardMarkup.modified(
|
||||
block: InlineKeyboardBuilder.() -> Unit
|
||||
) = InlineKeyboardBuilder().apply {
|
||||
keyboard.forEach { add(it) }
|
||||
block()
|
||||
}.build()
|
||||
|
||||
|
||||
/**
|
||||
* Creates and put [PayInlineKeyboardButton]
|
||||
|
Reference in New Issue
Block a user