Getting participants of a group/channel
export interface IterParticipantsParams {
limit?: number,
search?: string,
filter?: Api.TypeChannelParticipantsFilter,
}getParticipants(entity: EntityLike, params: chatMethods.IterParticipantsParams);getParticipants(entity, params);Examples:
Using iterParticipants
iterParticipantsconst participants = client.iterParticipants("your_entity_here", {
limit: 10,
});
for await (const participant of participants) {
//console.log("participant is", participant); // this line is very verbose but helpful for debugging
console.log("username text is : ", participant.username);
}Using getParticipants
getParticipantsLast updated