Introduce NewOneTimeReplyKeyboard() helper function
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
@@ -704,6 +704,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 {