justdmitry / NetTelegramBotApi

C# client library for building Telegram bot
MIT License
74 stars 28 forks source link

How to send inline keyboard/buttons? #39

Closed shdehnavi closed 7 years ago

shdehnavi commented 7 years ago

hi, i can send replymarkup keyboard but i wanna send inline buttons, how i can send message with inline keyboard buttons ?

justdmitry commented 7 years ago
var newMsg = new SendMessage(...) {
    ReplyMarkup = new InlineKeyboardMarkup 
    {
        InlineKeyboard = new[] 
        {
            new[] { new InlineKeyboardButton(...), new InlineKeyboardButton(...) },
            new[] { new InlineKeyboardButton(...), new InlineKeyboardButton(...) },
        }
    }
}
shdehnavi commented 7 years ago

thanQ

what does this codes means ?

        OneTimeKeyboard = true,

ResizeKeyboard = true

justdmitry commented 7 years ago

All parameters are described in Telegram documentation