all repos — telegram-bot-api @ 49a467b7c416fd06d6de7f67549ac42d5339e78b

Golang bindings for the Telegram Bot API

Introduce NewOneTimeReplyKeyboard() helper function

(cherry picked from commit b478ff9669daca239e94cf0659e7c941a5071a6c)
rozha il.novikov@gmail.com
Sun, 11 Aug 2019 13:20:40 +0300
commit

49a467b7c416fd06d6de7f67549ac42d5339e78b

parent

4f6c0f14db51526d7cb0e368c2e1ffe05ab19a45

1 files changed, 7 insertions(+), 0 deletions(-)

jump to
M helpers.gohelpers.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 {