Layer 231
ButtonType
The type of a reply keyboard button: a plain text button, or a button that requests the user's location, phone number, a peer or a poll, or opens a simple mini app.
Type
Available Constructors
In Gogram, this type is represented as tg.ButtonType interface.
Use any of the following constructors:
ButtonTypeDefault
Simple text button: pressing it sends its text as a message.
ButtonTypeRequestGeoLocation
Button that sends the user's current location when pressed.
ButtonTypeRequestPeer
Button that asks the user to choose one or more peers of the given type and sends them to the bot.
ButtonTypeRequestPhone
Button that sends the user's phone number when pressed.
ButtonTypeRequestPoll
Button that asks the user to create a poll and send it.
ButtonTypeSimpleWebView
Button that opens a simple web view (Mini App) at the given URL.
InputButtonTypeRequestPeer
Button that asks the user to choose one or more peers of the given type, as passed when creating a k
Gogram Example
// ButtonType is an interface type // You can use any of the following constructors: var _ tg.ButtonType = &tg.ButtonTypeDefault{} var _ tg.ButtonType = &tg.ButtonTypeRequestGeoLocation{} var _ tg.ButtonType = &tg.ButtonTypeRequestPeer{} var _ tg.ButtonType = &tg.ButtonTypeRequestPhone{} var _ tg.ButtonType = &tg.ButtonTypeRequestPoll{} // ... and 2 more constructors