all repos — telegram-bot-api @ b478ff9669daca239e94cf0659e7c941a5071a6c

Golang bindings for the Telegram Bot API

Introduce NewOneTimeReplyKeyboard() helper function
rozha il.novikov@gmail.com
Sun, 11 Aug 2019 13:20:40 +0300
commit

b478ff9669daca239e94cf0659e7c941a5071a6c

parent

cea05bfc443c89b43d5fa0ddd28eeb15dfe20639

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

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