@@ -19,6 +19,10 @@ var _ Button = (*UrlButton)(nil)
1919var _ Button = (* SwitchInlineQueryButton )(nil )
2020var _ Button = (* SwitchInlineQueryCurrentChatButton )(nil )
2121
22+ func NewDataButton (text , data string ) * DataButton {
23+ return & DataButton {Text : text , Data : data }
24+ }
25+
2226type DataButton struct {
2327 Text string
2428 Data string
@@ -37,6 +41,10 @@ type UrlButton struct {
3741 URL string
3842}
3943
44+ func NewUrlButton (text , url string ) * UrlButton {
45+ return & UrlButton {Text : text , URL : url }
46+ }
47+
4048func (UrlButton ) ButtonType () ButtonType {
4149 return ButtonTypeURL
4250}
@@ -50,6 +58,10 @@ type SwitchInlineQueryButton struct {
5058 Query string
5159}
5260
61+ func NewSwitchInlineQueryButton (text , query string ) * SwitchInlineQueryButton {
62+ return & SwitchInlineQueryButton {Text : text , Query : query }
63+ }
64+
5365func (SwitchInlineQueryButton ) ButtonType () ButtonType {
5466 return ButtonTypeSwitchInlineQuery
5567}
@@ -63,6 +75,10 @@ type SwitchInlineQueryCurrentChatButton struct {
6375 Query string
6476}
6577
78+ func NewSwitchInlineQueryCurrentChatButton (text , query string ) * SwitchInlineQueryCurrentChatButton {
79+ return & SwitchInlineQueryCurrentChatButton {Text : text , Query : query }
80+ }
81+
6682func (SwitchInlineQueryCurrentChatButton ) ButtonType () ButtonType {
6783 return ButtonTypeSwitchInlineQueryCurrentChat
6884}
0 commit comments