Merge pull request #554 from nickRiNi/master
NewInlineKeyboardButtonWebApp & NewKeyboardButtonWebApp addedbot-api-6.1
commit
00ae020205
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
|
// NewKeyboardButtonContact creates a keyboard button that requests
|
||||||
// user contact information upon click.
|
// user contact information upon click.
|
||||||
func NewKeyboardButtonContact(text string) KeyboardButton {
|
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
|
// NewInlineKeyboardButtonLoginURL creates an inline keyboard button with text
|
||||||
// which goes to a LoginURL.
|
// which goes to a LoginURL.
|
||||||
func NewInlineKeyboardButtonLoginURL(text string, loginURL LoginURL) InlineKeyboardButton {
|
func NewInlineKeyboardButtonLoginURL(text string, loginURL LoginURL) InlineKeyboardButton {
|
||||||
|
|
Loading…
Reference in New Issue