Class KeyboardButtonType Note: request_contact and request_location options will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.

see
package Default

 Methods

create()

create(\TgBotApi\BotApiBase\Type\string $text, array $data = null
Static

Parameters

$text

$data

Exceptions

\TgBotApi\BotApiBase\Exception\BadArgumentException

fill()

fill(array $data, array $forbidden = array()
Inherited

Parameters

$data

array

$forbidden

array

Exceptions

\TgBotApi\BotApiBase\Exception\BadArgumentException

 Properties

 

Optional. If True, the user's phone number will be sent as a contact when the button is pressed.

$requestContact : boolean | null

Default

Available in private chats only.

 

Optional. If True, the user's current location will be sent when the button is pressed.

$requestLocation : boolean | null

Default

Available in private chats only.

 

Optional. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only.

$requestPoll : \TgBotApi\BotApiBase\Type\Poll\KeyboardButtonPollType

Default

 

Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed.

$text : string

Default