If it's a normal KeyboardButton with text, a message will be
sent, and the sent Message <Message> returned.
If it's an inline KeyboardButtonCallback with text and data,
it will be "clicked" and the BotCallbackAnswer returned.
If it's an inline KeyboardButtonSwitchInline button, the
StartBot will be invoked and the resulting updates
returned.
If it's a KeyboardButtonUrl, the URL of the button will
be returned.
If it's a KeyboardButtonRequestPhone, you must indicate that you
want to sharePhone=True in order to share it. Sharing it is not a
default because it is a privacy concern and could happen accidentally.
You may also use sharePhone=phone to share a specific number, in
which case either str or InputMediaContact should be used.
If it's a KeyboardButtonRequestGeoLocation, you must pass a
tuple in shareGeo=[longitude, latitude]. Note that Telegram seems
to have some heuristics to determine impossible locations, so changing
this value a lot quickly may not work as expected. You may also pass a
InputGeoPoint if you find the order confusing.
Emulates the behaviour of clicking this button.
If it's a normal
KeyboardButtonwith text, a message will be sent, and the sentMessage <Message>returned.If it's an inline
KeyboardButtonCallbackwith text and data, it will be "clicked" and theBotCallbackAnswerreturned.If it's an inline
KeyboardButtonSwitchInlinebutton, theStartBotwill be invoked and the resulting updates returned.If it's a
KeyboardButtonUrl, the URL of the button will be returned.If it's a
KeyboardButtonRequestPhone, you must indicate that you want tosharePhone=Truein order to share it. Sharing it is not a default because it is a privacy concern and could happen accidentally.You may also use
sharePhone=phoneto share a specific number, in which case eitherstrorInputMediaContactshould be used.If it's a
KeyboardButtonRequestGeoLocation, you must pass a tuple inshareGeo=[longitude, latitude]. Note that Telegram seems to have some heuristics to determine impossible locations, so changing this value a lot quickly may not work as expected. You may also pass aInputGeoPointif you find the order confusing.