From fd6ea6fe8545b7e022c7959dbb1cae2d188bf5e2 Mon Sep 17 00:00:00 2001 From: Sergey Date: Thu, 22 Aug 2019 10:01:18 +0300 Subject: [PATCH] Add LoginUrl for InlineKeyboardButton --- helpers.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/helpers.go b/helpers.go index 3dabe11..d0af904 100644 --- a/helpers.go +++ b/helpers.go @@ -622,7 +622,7 @@ func NewEditMessageCaption(chatID int64, messageID int, caption string) EditMess ChatID: chatID, MessageID: messageID, }, - Caption: caption, + Caption: caption, } } @@ -713,6 +713,15 @@ func NewInlineKeyboardButtonData(text, data string) InlineKeyboardButton { } } +// NewInlineKeyboardButtonLoginURL creates an inline keyboard button with text +// which goes to a Login URL. +func NewInlineKeyboardButtonLoginURL(text string, loginUrl LoginUrl) InlineKeyboardButton { + return InlineKeyboardButton{ + Text: text, + LoginUrl: &loginUrl, + } +} + // NewInlineKeyboardButtonURL creates an inline keyboard button with text // which goes to a URL. func NewInlineKeyboardButtonURL(text, url string) InlineKeyboardButton {