File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,22 +3,31 @@ package botkb
33type ButtonType int
44
55type Button interface {
6+ GetText () string
67 ButtonType () ButtonType
78}
89
910const (
1011 ButtonTypeData ButtonType = iota
1112 ButtonTypeURL
13+ ButtonTypeSwitchInlineQuery
14+ ButtonTypeSwitchInlineQueryCurrentChat
1215)
1316
1417var _ Button = (* DataButton )(nil )
1518var _ Button = (* UrlButton )(nil )
19+ var _ Button = (* SwitchInlineQueryButton )(nil )
20+ var _ Button = (* SwitchInlineQueryCurrentChatButton )(nil )
1621
1722type DataButton struct {
1823 Text string
1924 Data string
2025}
2126
27+ func (b DataButton ) GetText () string {
28+ return b .Text
29+ }
30+
2231func (DataButton ) ButtonType () ButtonType {
2332 return ButtonTypeData
2433}
@@ -31,3 +40,33 @@ type UrlButton struct {
3140func (UrlButton ) ButtonType () ButtonType {
3241 return ButtonTypeURL
3342}
43+
44+ func (b UrlButton ) GetText () string {
45+ return b .Text
46+ }
47+
48+ type SwitchInlineQueryButton struct {
49+ Text string
50+ Query string
51+ }
52+
53+ func (SwitchInlineQueryButton ) ButtonType () ButtonType {
54+ return ButtonTypeSwitchInlineQuery
55+ }
56+
57+ func (b SwitchInlineQueryButton ) GetText () string {
58+ return b .Text
59+ }
60+
61+ type SwitchInlineQueryCurrentChatButton struct {
62+ Text string
63+ Query string
64+ }
65+
66+ func (SwitchInlineQueryCurrentChatButton ) ButtonType () ButtonType {
67+ return ButtonTypeSwitchInlineQueryCurrentChat
68+ }
69+
70+ func (b SwitchInlineQueryCurrentChatButton ) GetText () string {
71+ return b .Text
72+ }
You can’t perform that action at this time.
0 commit comments