This repository was archived by the owner on Jul 14, 2026. It is now read-only.
Repository navigation
Is it possible to remove users from a group? #257
blacksabbatherMJ
started this conversation in
General
Replies: 2 comments 6 replies
|
Try this for supergroups: await client.invoke(
new Api.channels.EditBanned({
channel: channelId,
participant: userId,
bannedRights: new Api.ChatBannedRights({
untilDate: 0,
viewMessages: true,
sendMessages: true,
sendMedia: true,
sendStickers: true,
sendGifs: true,
sendGames: true,
sendInline: true,
embedLinks: true
})
})And this for small groups: await client.invoke(
new Api.messages.DeleteChatUser({
chatId: chatId,
userId: userId
})
) |
4 replies
|
Guys, I'm afraid I have to re-phrase my questions as TG is so confusing: const participants = client.iterParticipants("myGroup", {
limit: 10000,
});and participants only gives me 750 users meanwhile in TG app, it shows I have around 2000 users. Question 2 - How to remove all "Deleted Account": if(participant.deleted){
console.log("username text is : ", participant.username);
}And it also gives mis-matched number... |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I already figured out using iterParticipants to list all participants from a particular group. How to remove participants from a group? Which function can I call? Thanks~
All reactions