Layer 224
Type

Available Constructors

In Gogram, this type is represented as tg.KeyboardButton interface. Use any of the following constructors:

KeyboardButtonUrl URL button KeyboardButtonCallback Callback button KeyboardButton Bot keyboard button KeyboardButtonRequestGeoLocation Button to request a user's geolocation KeyboardButtonRequestPhone Button to request a user's phone number KeyboardButtonGame Button to start a game KeyboardButtonSwitchInline Button to force a user to switch to inline mode: pressing the button will prompt the user to select KeyboardButtonBuy Button to buy a product 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 InputKeyboardButtonUrlAuth Button to request a user to authorize via URL using Seamless Telegram Login. InputKeyboardButtonUserProfile Button that links directly to a user profile KeyboardButtonUserProfile Button that links directly to a user profile KeyboardButtonSimpleWebView Button to open a bot mini app using messages. request Simple Web View, without sending user information KeyboardButtonWebView Button to open a bot mini app using messages. request Web View, sending over user information after us KeyboardButtonRequestPeer Prompts the user to select and share one or more peers with the bot using messages. send Bot Requested P InputKeyboardButtonRequestPeer Prompts the user to select and share one or more peers with the bot using messages. send Bot Requested P 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.KeyboardButtonUrl{}
var _ tg.KeyboardButton = &tg.KeyboardButtonCallback{}
var _ tg.KeyboardButton = &tg.KeyboardButton{}
var _ tg.KeyboardButton = &tg.KeyboardButtonRequestGeoLocation{}
var _ tg.KeyboardButton = &tg.KeyboardButtonRequestPhone{}
// ... and 13 more constructors