Introduce NewOneTimeReplyKeyboard() helper function
This commit is contained in:
parent
cea05bfc44
commit
b478ff9669
1 changed files with 7 additions and 0 deletions
|
@ -704,6 +704,13 @@ func NewReplyKeyboard(rows ...[]KeyboardButton) ReplyKeyboardMarkup {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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
|
// NewInlineKeyboardButtonData creates an inline keyboard button with text
|
||||||
// and data for a callback.
|
// and data for a callback.
|
||||||
func NewInlineKeyboardButtonData(text, data string) InlineKeyboardButton {
|
func NewInlineKeyboardButtonData(text, data string) InlineKeyboardButton {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue