Layer 220
KeyboardButton
Abstract type representing one of 18 possible constructors.
Type
Available Constructors
In Gogram, this type is represented as tg.KeyboardButton interface.
Use any of the following constructors:
KeyboardButton
Bot keyboard button
KeyboardButtonCallback
Callback button
KeyboardButtonUrl
URL button
KeyboardButtonRequestGeoLocation
Button to request a user's geolocation
KeyboardButtonRequestPhone
Button to request a user's phone number
KeyboardButtonGame
Button to start a game
InputKeyboardButtonUrlAuth
Button to request a user to authorize via URL using Seamless Telegram Login.
KeyboardButtonBuy
Button to buy a product
KeyboardButtonSwitchInline
Button to force a user to switch to inline mode: pressing the button will prompt the user to select
KeyboardButtonUrlAuth
Button to request a user to authorize via URL using Seamless Telegram Login. When the user clicks o
KeyboardButtonRequestPoll
A button that allows the user to create and send a poll when pressed; available only in private
KeyboardButtonUserProfile
Button that links directly to a user profile
InputKeyboardButtonUserProfile
Button that links directly to a user profile
KeyboardButtonRequestPeer
Prompts the user to select and share one or more peers with the bot using messages. send Bot Requested P
KeyboardButtonWebView
Button to open a bot mini app using messages. request Web View, sending over user information after us
InputKeyboardButtonRequestPeer
Prompts the user to select and share one or more peers with the bot using messages. send Bot Requested P
KeyboardButtonSimpleWebView
Button to open a bot mini app using messages. request Simple Web View, without sending user information
KeyboardButtonCopy
Clipboard button: when clicked, the attached text must be copied to the clipboard.
Gogram Example
// KeyboardButton is an interface type // You can use any of the following constructors: var _ tg.KeyboardButton = &tg.KeyboardButton{} var _ tg.KeyboardButton = &tg.KeyboardButtonCallback{} var _ tg.KeyboardButton = &tg.KeyboardButtonUrl{} var _ tg.KeyboardButton = &tg.KeyboardButtonRequestGeoLocation{} var _ tg.KeyboardButton = &tg.KeyboardButtonRequestPhone{} // ... and 13 more constructors