KeyboardButton

data class KeyboardButton(text: String, request_contact: Boolean?, request_location: Boolean?, request_poll: KeyboardButtonPollType?) : TelegramModel

This object represents one button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields request_contact, request_location, and request_poll are mutually exclusive.

Note: request_contact and request_location options will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported message.
Note: request_poll option will only work in Telegram versions released after 23 January, 2020. Older clients will display unsupported message.

Constructors

KeyboardButton
Link copied to clipboard
fun KeyboardButton(text: String, request_contact: Boolean? = null, request_location: Boolean? = null, request_poll: KeyboardButtonPollType? = null)
Creates a KeyboardButton.

Properties

request_contact
Link copied to clipboard
val request_contact: Boolean? = null
Optional.
request_location
Link copied to clipboard
val request_location: Boolean? = null
Optional.
request_poll
Link copied to clipboard
val request_poll: KeyboardButtonPollType? = null
Optional.
text
Link copied to clipboard
val text: String
Text of the button.