Closed nivos20 closed 1 year ago
Telegram.Td.Api.GetChatHistory
returns an object of type Telegram.Td.Api.Messages
or Telegram.Td.Api.Error
. You need to check object's type and convert it to an appropriate type. For example,
if (response is Messages messages) {
// process messages
}
When I use this command :
_client.Send(new TdApi.GetChatHistory(777000, 2, -99, 100, false), GetMessageHandler);
I get all message history from a chat but the thing is that I get the info as
@object
and the only way to interact with the info recieved is to useToString()
.Is there a way to extract a part of the data that is received on result (for example extract keep separately the user and message id) without using some kind of separation manipulation? (Split function for example)