You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 5, 2021. It is now read-only.
Hi, i want to get all members in group but my code only attracts 10k members.
`
public static async Task GetChatInfo(string groupName)
{
if (! await AuthUser()) return null;
var result = new ChannelInfo();
var dialogs = (TLDialogs)await client.GetUserDialogsAsync();
var main = dialogs.chats.lists.Where(c => c.GetType() == typeof(TLChannel))
.Cast()
.FirstOrDefault(c => c.title == (groupName));
var req = new TLRequestGetFullChannel()
{
channel = new TLInputChannel() { access_hash = main.access_hash.Value, channel_id = main.id }
};
var res = await client.SendRequestAsync<TeleSharp.TL.Messages.TLChatFull>(req);
//we have to do this in slices
var offset = 0;
result.Channel = main;
result.ChatFull = res;
while (offset < (res.full_chat as TLChannelFull).participants_count)
{
var pReq = new TLRequestGetParticipants()
{
channel = new TLInputChannel() { access_hash = main.access_hash.Value, channel_id = main.id },
filter = new TLChannelParticipantsRecent() { },
limit = 200,
offset = offset
};
var pRes = await client.SendRequestAsync<TLChannelParticipants>(pReq);
result.Users.AddRange(pRes.users.lists.Cast<TLUser>());
offset += 200;
await Task.Delay(500);
}
return result;
}