Replies: 1 comment
-
Here the tdlib maintainers are telling that only bots can use reply markup. An I'm not sure if you can technically write a bot using tdlib. The bot API is for the bots, right? Anyway, I'd recommend asking for clarification from the upstream maintainers. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I tried to send InlineKeyboardButtons in a user account, see the code below, but it does not send the InlineKeyboardButton in the app, it only sends the InputMessageText text. Thanks in advance.
`var button1 = new TdApi.InlineKeyboardButton();
button1.Type = new TdApi.InlineKeyboardButtonType.InlineKeyboardButtonTypeUrl();
button1.Text = "https://telegram.org?1";
var button2 = new TdApi.InlineKeyboardButton();
button2.Type = new TdApi.InlineKeyboardButtonType.InlineKeyboardButtonTypeUrl();
button2.Text = "https://telegram.org?2";
var button3 = new TdApi.InlineKeyboardButton() {
Type = new TdApi.InlineKeyboardButtonType.InlineKeyboardButtonTypeUrl(),
Text = "https://google.com"
};
TdApi.InlineKeyboardButton[] rows = { button3, button1, button2 };
var replyMarkup = new TdApi.ReplyMarkup.ReplyMarkupInlineKeyboard();
replyMarkup.Rows = new TdApi.InlineKeyboardButton[][] { rows, rows };
var content2 = new TdApi.InputMessageContent.InputMessageText()
{
Extra = null,
Text = new TdApi.FormattedText() { Extra = null, Text = "Message with InlineKeyboardButton" }
};
await _client.ExecuteAsync(new TdApi.SendMessage() {
ChatId = chatId,
ReplyMarkup = replyMarkup,
InputMessageContent = content2
});`
Beta Was this translation helpful? Give feedback.
All reactions