sochix / TLSharp

Telegram client library implemented in C#
1.01k stars 380 forks source link

Get first message #849

Open hosseinGanjyar opened 5 years ago

hosseinGanjyar commented 5 years ago

How can I get first message that posted in group/channel, without scroll that from now to begin of create it? I need Id of first message to find first Id.

emreordukaya commented 5 years ago

You can write simple loop for it. You have to learn count of post firstly. then write for loop with this numbers. First you can take the first post from channel or group. if post type is TLMessageService then; You can take the second and controll it again. then third... ect. When post type is TLMessage then this post is the first message of the channel or group.