Merge pull request #256 from rozha/helpers-NewOneTimeReplyKeyboard Introduce NewOneTimeReplyKeyboard() helper function
Syfaro syfaro@huefox.com
Tue, 21 Jul 2020 03:36:40 -0500
1 files changed,
7 insertions(+),
0 deletions(-)
jump to
M
helpers.go
→
helpers.go
@@ -776,6 +776,13 @@ Keyboard: keyboard,
} } +// 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 // and data for a callback. func NewInlineKeyboardButtonData(text, data string) InlineKeyboardButton {