Package dev.inmo.tgbotapi.types.buttons

Types

Link copied to clipboard
data class InlineKeyboardMarkup(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(selective: Boolean?, inputFieldPlaceholder: String?) : KeyboardMarkup
Link copied to clipboard
data class ReplyKeyboardMarkup(keyboard: Matrix<KeyboardButton>, resizeKeyboard: Boolean?, oneTimeKeyboard: Boolean?, inputFieldPlaceholder: String?, selective: Boolean?) : KeyboardMarkup
Link copied to clipboard
data class ReplyKeyboardRemove(selective: Boolean?) : KeyboardMarkup
Link copied to clipboard
data class RequestContactKeyboardButton(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(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(text: String, 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(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(text: String, 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.