@@ -99,7 +99,7 @@ async Task<Message> SendInlineKeyboard(Message msg)
9999 . AddNewRow ( "1.1" , "1.2" , "1.3" )
100100 . AddNewRow ( )
101101 . AddButton ( "WithCallbackData" , "CallbackData" )
102- . AddButton ( InlineKeyboardButton . WithUrl ( "WithUrl" , "https://github.com/TelegramBots/Telegram.Bot" ) ) ;
102+ . AddButton ( new InlineKeyboardButton ( "WithUrl" , "https://github.com/TelegramBots/Telegram.Bot" ) ) ;
103103 return await bot . SendMessage ( msg . Chat , "Inline buttons:" , replyMarkup : inlineMarkup ) ;
104104 }
105105
@@ -119,14 +119,14 @@ async Task<Message> RemoveKeyboard(Message msg)
119119 async Task < Message > RequestContactAndLocation ( Message msg )
120120 {
121121 var replyMarkup = new ReplyKeyboardMarkup ( true )
122- . AddButton ( KeyboardButton . WithRequestLocation ( "Location" ) )
123- . AddButton ( KeyboardButton . WithRequestContact ( "Contact" ) ) ;
122+ . AddButton ( new ( "Location" , requestLocation : true ) )
123+ . AddButton ( new ( "Contact" , requestContact : true ) ) ;
124124 return await bot . SendMessage ( msg . Chat , "Who or Where are you?" , replyMarkup : replyMarkup ) ;
125125 }
126126
127127 async Task < Message > StartInlineQuery ( Message msg )
128128 {
129- var button = InlineKeyboardButton . WithSwitchInlineQueryCurrentChat ( "Inline Mode" ) ;
129+ var button = new InlineKeyboardButton ( "Inline Mode" , InlineButtonType . SwitchInlineQueryCurrentChat ) ;
130130 return await bot . SendMessage ( msg . Chat , "Press the button to start Inline Query\n \n " +
131131 "(Make sure you enabled Inline Mode in @BotFather)" , replyMarkup : new InlineKeyboardMarkup ( button ) ) ;
132132 }
0 commit comments