ReplyKeyboardMarkup, KeyboardButton
Xondamir Abduxoshimov


Last updated
Was this helpful?
Was this helpful?
// ReplyKeyboardMarkup obyekt olish
ReplyKeyboardMarkup markup = new ReplyKeyboardMarkup();
// Keyboard sinfiga oid jagged(massiv ichida massiv)
// masivini hosil qilish
markup.Keyboard = new KeyboardButton[][]
{
// 1 - qator
new KeyboardButton[]
{
new KeyboardButton("A"),
new KeyboardButton("B")
},
// 2 - qator
new KeyboardButton[]
{
new KeyboardButton("C"),
new KeyboardButton("D")
}
};
await client.SendTextMessageAsync(
chatId: e.Message.Chat.Id,
text: "1 - test",
replyMarkup: markup
);if (e.Message.Text == "/start")
{
ReplyKeyboardMarkup markup =
new ReplyKeyboardMarkup
(KeyboardButton.WithRequestContact("Contact yuborish"));
markup.ResizeKeyboard = true;
await client.SendTextMessageAsync(
chatId: e.Message.Chat.Id,
text: "Contact",
replyMarkup: markup
);
}