Merge pull request #256 from rozha/helpers-NewOneTimeReplyKeyboard

Introduce NewOneTimeReplyKeyboard() helper function
bot-api-6.1
Syfaro 2020-07-21 03:36:40 -05:00 committed by GitHub
commit c310f538bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

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