C# Please tell me an example of how to use C# UpdateMessageSendSuccessful
private static void sendMessage(long chatId, string message) { // initialize reply markup just for testing TdApi.InlineKeyboardButton[] row = { new TdApi.InlineKeyboardButton("https://telegram.org?1", new TdApi.InlineKeyboardButtonTypeUrl()), new TdApi.InlineKeyboardButton("https://telegram.org?2", new TdApi.InlineKeyboardButtonTypeUrl()), new TdApi.InlineKeyboardButton("https://telegram.org?3", new TdApi.InlineKeyboardButtonTypeUrl()) }; TdApi.ReplyMarkup replyMarkup = new TdApi.ReplyMarkupInlineKeyboard(new TdApi.InlineKeyboardButton[][] { row, row, row });
TdApi.InputMessageContent content = new TdApi.InputMessageText(new TdApi.FormattedText(message, null), false, true);
// TdApi.InputMessageContent csa = new TdApi.InputMessageDocument(new TdApi.InputFileLocal(loginform.textBox1.Text), null, false, new TdApi.FormattedText(message, null));
TdApi.InputMessageContent imageSend = new TdApi.InputMessagePhoto(new TdApi.InputFileLocal(loginform.textBox1.Text), null, null, 0, 0, new TdApi.FormattedText(message, null), 0);
if(loginform.checkBox1.Checked == true)
{
_client.Send(new TdApi.SendMessage(chatId, 0, 0, null, replyMarkup, imageSend), _defaultHandler);
}
else
{
_client.Send(new TdApi.SendMessage(chatId, 0, 0, null, replyMarkup, content), null);
}
}
We're sending a message through this function I would like to check for shipping errors using the UpdateMessageSendSuccessful class I don't know how Please show me the source code for example in C#
You must wait for updateMessageSendSucceeded, updateMessageSendFailed, or updateDeleteMessages update about the message. Updates are received independently from request responses.
You must wait for
updateMessageSendSucceeded,updateMessageSendFailed, orupdateDeleteMessagesupdate about the message. Updates are received independently from request responses.
Please show me the example code in C#
You can find all available examples in C# at https://github.com/tdlib/td/blob/master/example/README.md#csharp.