File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,27 @@ func (kb *KeyboardBuilder) Build() *ReplyInlineMarkup {
7979 return & ReplyInlineMarkup {Rows : kb .rows }
8080}
8181
82+ type BuildReplyOptions struct {
83+ ResizeKeyboard bool
84+ OneTime bool
85+ Selective bool
86+ Persistent bool
87+ Placeholder string
88+ }
89+
90+ // BuildReply finalizes the keyboard and returns the reply keyboard markup.
91+ func (kb * KeyboardBuilder ) BuildReply (opts ... BuildReplyOptions ) * ReplyKeyboardMarkup {
92+ opt := getVariadic (opts , BuildReplyOptions {})
93+ return & ReplyKeyboardMarkup {
94+ Resize : opt .ResizeKeyboard ,
95+ SingleUse : opt .OneTime ,
96+ Selective : opt .Selective ,
97+ Placeholder : opt .Placeholder ,
98+ Rows : kb .rows ,
99+ Persistent : opt .Persistent ,
100+ }
101+ }
102+
82103func (ButtonBuilder ) Text (text string ) * KeyboardButtonObj {
83104 return & KeyboardButtonObj {Text : text }
84105}
You can’t perform that action at this time.
0 commit comments