Introduce NewOneTimeReplyKeyboard() helper function

(cherry picked from commit b478ff9669)
bot-api-6.1
rozha 2019-08-11 13:20:40 +03:00 committed by Syfaro
parent 4f6c0f14db
commit 49a467b7c4
1 changed files with 7 additions and 0 deletions

View File

@ -761,6 +761,13 @@ func NewReplyKeyboard(rows ...[]KeyboardButton) ReplyKeyboardMarkup {
}
}
// NewOneTimeReplyKeyboard creates a new one time keyboard using NewReplyKeyboard()
func NewOneTimeReplyKeyboard(rows ...[]KeyboardButton) ReplyKeyboardMarkup {
markup := NewReplyKeyboard(rows...)
markup.OneTimeKeyboard = true
return markup
}
// NewInlineKeyboardButtonData creates an inline keyboard button with text
// and data for a callback.
func NewInlineKeyboardButtonData(text, data string) InlineKeyboardButton {