Package dev.inmo.tgbotapi.types.buttons

Types

Link copied to clipboard
data class InlineKeyboardMarkup(val keyboard: Matrix<InlineKeyboardButton>) : KeyboardMarkup
Link copied to clipboard
interface KeyboardButton

Representation union of https://core.telegram.org/bots/api#keyboardbutton . See inheritors for more info

Link copied to clipboard
interface KeyboardButtonPollType

Poll type for RequestPollKeyboardButton. Visit https://core.telegram.org/bots/api#keyboardbuttonpolltype for more info and see inheritors.

Link copied to clipboard
object KeyboardButtonPollTypeSerializer : KSerializer<KeyboardButtonPollType>
Link copied to clipboard
object KeyboardButtonSerializer : KSerializer<KeyboardButton>
Link copied to clipboard
interface KeyboardMarkup
Link copied to clipboard
object KeyboardMarkupSerializer : KSerializer<KeyboardMarkup>
Link copied to clipboard
typealias Matrix<T> = List<List<T>>
Link copied to clipboard
object QuizKeyboardButtonPollType : KeyboardButtonPollType

Quiz poll type

Link copied to clipboard
object RegularKeyboardButtonPollType : KeyboardButtonPollType

Just a regular poll type

Link copied to clipboard
data class ReplyForce(val selective: Boolean? = null, val inputFieldPlaceholder: String? = null) : KeyboardMarkup
Link copied to clipboard
data class ReplyKeyboardMarkup(    val keyboard: Matrix<KeyboardButton>,     val resizeKeyboard: Boolean? = null,     val oneTimeKeyboard: Boolean? = null,     val inputFieldPlaceholder: String? = null,     val selective: Boolean? = null) : KeyboardMarkup
Link copied to clipboard
data class ReplyKeyboardRemove(val selective: Boolean? = null) : KeyboardMarkup
Link copied to clipboard
data class RequestContactKeyboardButton(val text: String) : KeyboardButton

Private chats only. When user will tap on this button, his contact (with his number and name) will be sent to the bot. You will be able to catch this contact in updates and data using dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling.onContact in case you are using Behaviour Builder OR with dev.inmo.tgbotapi.updateshandlers.FlowsUpdatesFilter.messagesFlow and kotlinx.coroutines.flow.filterIsInstance and filtering by type dev.inmo.tgbotapi.types.message.abstracts.CommonMessage and dev.inmo.tgbotapi.extensions.utils.onlyContactContentMessages

Link copied to clipboard
data class RequestLocationKeyboardButton(val text: String) : KeyboardButton

Private chats only. When user will tap on this button, his location will be sent to the bot. You will be able to catch this location in updates and data using dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling.onLocation in case you are using Behaviour Builder OR with dev.inmo.tgbotapi.updateshandlers.FlowsUpdatesFilter.messagesFlow and kotlinx.coroutines.flow.filterIsInstance and filtering by type dev.inmo.tgbotapi.types.message.abstracts.CommonMessage and dev.inmo.tgbotapi.extensions.utils.onlyLocationContentMessages

Link copied to clipboard
data class RequestPollKeyboardButton(val text: String, val requestPoll: KeyboardButtonPollType) : KeyboardButton

Private chats only. When user will tap on this button, he will be asked for the poll with requestPoll options. You will be able to catch this poll in updates and data using dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling.onPoll in case you are using Behaviour Builder OR with dev.inmo.tgbotapi.updateshandlers.FlowsUpdatesFilter.messagesFlow and kotlinx.coroutines.flow.filterIsInstance and filtering by type dev.inmo.tgbotapi.types.message.abstracts.CommonMessage and dev.inmo.tgbotapi.extensions.utils.onlyPollContentMessages

Link copied to clipboard
data class SimpleKeyboardButton(val text: String) : KeyboardButton

Simple button. user will send text of this button. You will be able to catch this text in updates and data using dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling.onText in case you are using Behaviour Builder OR with dev.inmo.tgbotapi.updateshandlers.FlowsUpdatesFilter.messagesFlow and kotlinx.coroutines.flow.filterIsInstance and filtering by type dev.inmo.tgbotapi.types.message.abstracts.CommonMessage and dev.inmo.tgbotapi.extensions.utils.onlyTextContentMessages

Link copied to clipboard
data class UnknownKeyboardButton : KeyboardButton
Link copied to clipboard
class UnknownKeyboardButtonPollType : KeyboardButtonPollType
Link copied to clipboard
data class WebAppKeyboardButton(val text: String, val webApp: WebAppInfo) : KeyboardButton

Private chats only. Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot.