# dev.inmo.tgbotapi.extensions.utils.types.buttons

docs

# Package dev.inmo.tgbotapi.extensions.utils.types.buttons

## Types

InlineKeyboardBuilder
Link copied to clipboard
class InlineKeyboardBuilder : MatrixBuilder < InlineKeyboardButton >
Content copied to clipboard

Core DSL part of Inline Keyboard DSL. Can accept only InlineKeyboardButton and returns ready to use InlineKeyboardMarkup via build method

InlineKeyboardRowBuilder
Link copied to clipboard
class InlineKeyboardRowBuilder : RowBuilder < InlineKeyboardButton >
Content copied to clipboard

Row builder of InlineKeyboardBuilder

ReplyKeyboardBuilder
Link copied to clipboard
class ReplyKeyboardBuilder : MatrixBuilder < KeyboardButton >
Content copied to clipboard

Core DSL part of Keyboard DSL. Can accept only KeyboardButton and returns ready to use ReplyKeyboardMarkup via build method

ReplyKeyboardRowBuilder
Link copied to clipboard
class ReplyKeyboardRowBuilder : RowBuilder < KeyboardButton >
Content copied to clipboard

Row builder of KeyboardButton

## Functions

dataButton
Link copied to clipboard
inline fun InlineKeyboardRowBuilder . dataButton (text: String , data: String ): Boolean
Content copied to clipboard

Creates and put CallbackDataInlineKeyboardButton

gameButton
Link copied to clipboard
inline fun InlineKeyboardRowBuilder . gameButton (text: String ): Boolean
Content copied to clipboard

Creates and put CallbackGameInlineKeyboardButton

inlineKeyboard
Link copied to clipboard
inline fun inlineKeyboard (block: InlineKeyboardBuilder .() -> Unit ): InlineKeyboardMarkup
Content copied to clipboard

Factory-function for InlineKeyboardBuilder. It will apply to internally created InlineKeyboardMarkup and InlineKeyboardBuilder.build then

InlineKeyboardMarkup
Link copied to clipboard
fun InlineKeyboardMarkup (vararg buttons: InlineKeyboardButton ): InlineKeyboardMarkup
Content copied to clipboard
inlineQueryButton
Link copied to clipboard
inline fun InlineKeyboardRowBuilder . inlineQueryButton (text: String , data: String ): Boolean
Content copied to clipboard

Creates and put SwitchInlineQueryInlineKeyboardButton

inlineQueryInCurrentChatButton
Link copied to clipboard
inline fun InlineKeyboardRowBuilder . inlineQueryInCurrentChatButton (text: String , data: String ): Boolean
Content copied to clipboard

Creates and put SwitchInlineQueryCurrentChatInlineKeyboardButton

loginButton
Link copied to clipboard
inline fun InlineKeyboardRowBuilder . loginButton (text: String , loginUrl: LoginURL ): Boolean
Content copied to clipboard

Creates and put LoginURLInlineKeyboardButton

payButton
Link copied to clipboard
inline fun InlineKeyboardRowBuilder . payButton (text: String ): Boolean
Content copied to clipboard

Creates and put PayInlineKeyboardButton

replyKeyboard
Link copied to clipboard
inline fun replyKeyboard ( resizeKeyboard: Boolean ? = null, oneTimeKeyboard: Boolean ? = null, inputFieldPlaceholder: String ? = null, selective: Boolean ? = null, block: ReplyKeyboardBuilder .() -> Unit ): ReplyKeyboardMarkup
Content copied to clipboard

Factory-function for ReplyKeyboardBuilder. It will apply to internally created ReplyKeyboardMarkup and ReplyKeyboardBuilder.build then

ReplyKeyboardMarkup
Link copied to clipboard
fun ReplyKeyboardMarkup ( vararg buttons: KeyboardButton , resizeKeyboard: Boolean ? = null, oneTimeKeyboard: Boolean ? = null, inputFieldPlaceholder: String ? = null, selective: Boolean ? = null): ReplyKeyboardMarkup
Content copied to clipboard
requestContactButton
Link copied to clipboard
inline fun ReplyKeyboardRowBuilder . requestContactButton (text: String ): Boolean
Content copied to clipboard

Creates and put RequestContactKeyboardButton

requestLocationButton
Link copied to clipboard
inline fun ReplyKeyboardRowBuilder . requestLocationButton (text: String ): Boolean
Content copied to clipboard

Creates and put RequestLocationKeyboardButton

requestPollButton
Link copied to clipboard
inline fun ReplyKeyboardRowBuilder . requestPollButton (text: String , pollType: KeyboardButtonPollType ): Boolean
Content copied to clipboard

Creates and put RequestPollKeyboardButton

row
Link copied to clipboard
inline fun InlineKeyboardBuilder . row (block: InlineKeyboardRowBuilder .() -> Unit ): Boolean
Content copied to clipboard

Creates an InlineKeyboardRowBuilder and apply with this builder

inline fun ReplyKeyboardBuilder . row (block: ReplyKeyboardRowBuilder .() -> Unit ): Boolean
Content copied to clipboard

Creates an ReplyKeyboardRowBuilder and apply with this builder

simpleButton
Link copied to clipboard
inline fun ReplyKeyboardRowBuilder . simpleButton (text: String ): Boolean
Content copied to clipboard

Creates and put SimpleKeyboardButton

urlButton
Link copied to clipboard
inline fun InlineKeyboardRowBuilder . urlButton (text: String , url: String ): Boolean
Content copied to clipboard

Creates and put URLInlineKeyboardButton

webAppButton
Link copied to clipboard
inline fun InlineKeyboardRowBuilder . webAppButton (text: String , webApp: WebAppInfo ): Boolean
Content copied to clipboard
inline fun InlineKeyboardRowBuilder . webAppButton (text: String , url: String ): Boolean
Content copied to clipboard

Creates and put WebAppInlineKeyboardButton. Please, remember that this button is available in private chats only

inline fun ReplyKeyboardRowBuilder . webAppButton (text: String , webApp: WebAppInfo ): Boolean
Content copied to clipboard
inline fun ReplyKeyboardRowBuilder . webAppButton (text: String , url: String ): Boolean
Content copied to clipboard

Creates and put WebAppKeyboardButton