Package dev.inmo.tgbotapi.types.buttons

Types

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

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

KeyboardButtonPollType
Link copied to clipboard
interface KeyboardButtonPollType

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

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

Quiz poll type

RegularKeyboardButtonPollType
Link copied to clipboard
object RegularKeyboardButtonPollType : KeyboardButtonPollType

Just a regular poll type

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

RequestLocationKeyboardButton
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

RequestPollKeyboardButton
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

SimpleKeyboardButton
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

UnknownKeyboardButton
Link copied to clipboard
data class UnknownKeyboardButton : KeyboardButton
UnknownKeyboardButtonPollType
Link copied to clipboard
class UnknownKeyboardButtonPollType : KeyboardButtonPollType