File tree Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ public class InlineKeyboardButton
60
60
/// <summary>
61
61
/// Optional. Description of the button that copies the specified text to the clipboard.
62
62
/// </summary>
63
- public CopyTextButton CopyTextButton { get ; set ; }
63
+ public CopyTextButton CopyText { get ; set ; }
64
64
65
65
/// <summary>
66
66
/// Optional. Description of the game that will be launched when the user presses the button.
@@ -72,5 +72,5 @@ public class InlineKeyboardButton
72
72
/// Optional. Specify True, to send a Pay button.
73
73
/// NOTE: This type of button must always be the first button in the first row.
74
74
/// </summary>
75
- public bool Pay { get ; set ; }
75
+ public bool ? Pay { get ; set ; }
76
76
}
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ namespace RxTelegram.Bot.Utils.Keyboard.Interfaces;
4
4
5
5
public interface IInlineKeyboardRow
6
6
{
7
+ public IInlineKeyboardRow AddButton ( InlineKeyboardButton button ) ;
8
+
7
9
public IInlineKeyboardRow AddUrl ( string text , string url ) ;
8
10
9
11
public IInlineKeyboardRow AddLoginUrl ( string text , LoginUrl loginUrl ) ;
@@ -14,6 +16,8 @@ public interface IInlineKeyboardRow
14
16
15
17
public IInlineKeyboardRow AddCallbackGame ( string text ) ;
16
18
19
+ public IInlineKeyboardRow AddCopyText ( string text , string copyText ) ;
20
+
17
21
public IInlineKeyboardRow AddSwitchInlineQuery ( string text , string switchInlineQuery ) ;
18
22
19
23
public IInlineKeyboardRow AddSetSwitchInlineQueryCurrentChat ( string text , string switchInlineQueryCurrentChat ) ;
Original file line number Diff line number Diff line change @@ -137,6 +137,25 @@ public IInlineKeyboardRow AddCallbackGame(string text)
137
137
return this ;
138
138
}
139
139
140
+ public IInlineKeyboardRow AddCopyText ( string text , string copyText )
141
+ {
142
+ _inlineRow . Add ( new InlineKeyboardButton
143
+ {
144
+ Text = text ,
145
+ CopyText = new CopyTextButton ( )
146
+ {
147
+ Text = copyText
148
+ }
149
+ } ) ;
150
+ return this ;
151
+ }
152
+
153
+ public IInlineKeyboardRow AddButton ( InlineKeyboardButton button )
154
+ {
155
+ _inlineRow . Add ( button ) ;
156
+ return this ;
157
+ }
158
+
140
159
public IInlineKeyboardRow AddSwitchInlineQuery ( string text , string switchInlineQuery )
141
160
{
142
161
_inlineRow . Add ( new InlineKeyboardButton { Text = text , SwitchInlineQuery = switchInlineQuery } ) ;
You can’t perform that action at this time.
0 commit comments