Package-level declarations

Types

Link copied to clipboard
@Serializable
data class InlineKeyboardMarkup(val keyboard: Matrix<InlineKeyboardButton>) : KeyboardMarkup
Link copied to clipboard
@Serializable(with = KeyboardButtonSerializer::class)
sealed interface KeyboardButton

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

Link copied to clipboard

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

Link copied to clipboard
@Serializable
data class KeyboardButtonRequestChat(val requestId: RequestId, val isChannel: Boolean? = null, val isForum: Boolean? = null, val isPublic: Boolean? = null, val isOwnedBy: Boolean? = null, val userRightsInChat: ChatCommonAdministratorRights? = null, val botRightsInChat: ChatCommonAdministratorRights? = null, val botIsMember: Boolean? = null)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Serializable(with = KeyboardMarkupSerializer::class)
sealed interface KeyboardMarkup
Link copied to clipboard
Link copied to clipboard
typealias Matrix<T> = List<List<T>>
Link copied to clipboard

Quiz poll type

Link copied to clipboard

Just a regular poll type

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

Private chats only. When user will tap on this button, he will be asked for the chat with requestChat options. You will be able to catch this ChatId in updates and data using dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling.onChatShared in case you are using Behaviour Builder OR with dev.inmo.tgbotapi.updateshandlers.FlowsUpdatesFilter.messagesFlow and kotlinx.coroutines.flow.filterIsInstance.

Link copied to clipboard
@Serializable
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
@Serializable
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
@Serializable
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
@Serializable
data class RequestUserKeyboardButton(val text: String, val requestUsers: KeyboardButtonRequestUsers) : KeyboardButton

Private chats only. When user will tap on this button, he will be asked for the chat with requestChat options. You will be able to catch this ChatId in updates and data using dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling.onUserShared in case you are using Behaviour Builder OR with dev.inmo.tgbotapi.updateshandlers.FlowsUpdatesFilter.messagesFlow and kotlinx.coroutines.flow.filterIsInstance.

Link copied to clipboard
@Serializable
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
@Serializable
data class UnknownKeyboardButton : KeyboardButton
Link copied to clipboard
@Serializable
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.