NewInlineKeyboardButtonWebApp & NewKeyboardButtonWebApp added
parent
537c005643
commit
daa1ed199c
18
helpers.go
18
helpers.go
|
@ -618,6 +618,15 @@ func NewKeyboardButton(text string) KeyboardButton {
|
|||
}
|
||||
}
|
||||
|
||||
// NewKeyboardButtonWebApp creates a keyboard button with text
|
||||
// which goes to a WebApp.
|
||||
func NewKeyboardButtonWebApp(text string, webapp WebAppInfo) KeyboardButton {
|
||||
return KeyboardButton{
|
||||
Text: text,
|
||||
WebApp: &webapp,
|
||||
}
|
||||
}
|
||||
|
||||
// NewKeyboardButtonContact creates a keyboard button that requests
|
||||
// user contact information upon click.
|
||||
func NewKeyboardButtonContact(text string) KeyboardButton {
|
||||
|
@ -673,6 +682,15 @@ func NewInlineKeyboardButtonData(text, data string) InlineKeyboardButton {
|
|||
}
|
||||
}
|
||||
|
||||
// NewInlineKeyboardButtonWebApp creates an inline keyboard button with text
|
||||
// which goes to a WebApp.
|
||||
func NewInlineKeyboardButtonWebApp(text string, webapp WebAppInfo) InlineKeyboardButton {
|
||||
return InlineKeyboardButton{
|
||||
Text: text,
|
||||
WebApp: &webapp,
|
||||
}
|
||||
}
|
||||
|
||||
// NewInlineKeyboardButtonLoginURL creates an inline keyboard button with text
|
||||
// which goes to a LoginURL.
|
||||
func NewInlineKeyboardButtonLoginURL(text string, loginURL LoginURL) InlineKeyboardButton {
|
||||
|
|
Loading…
Reference in New Issue