Introduce NewOneTimeReplyKeyboard() helper function (cherry picked from commit b478ff9669daca239e94cf0659e7c941a5071a6c)
rozha il.novikov@gmail.com
Sun, 11 Aug 2019 13:20:40 +0300
1 files changed,
7 insertions(+),
0 deletions(-)
jump to
M
helpers.go
→
helpers.go
@@ -761,6 +761,13 @@ Keyboard: keyboard,
} } +// 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 {