Introduce NewOneTimeReplyKeyboard() helper function

bot-api-6.1
rozha 2019-08-11 13:20:40 +03:00
parent cea05bfc44
commit b478ff9669
No known key found for this signature in database
GPG Key ID: 73CA0ED0E08F575D
1 changed files with 7 additions and 0 deletions

View File

@ -704,6 +704,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 {