Answer the question
In order to leave comments, you need to log in
Telethon how to know in advance that the user has restricted the ability to add himself to groups?
Good day! I need to transfer the members of my chat from one group to another, so I collect their id in an array and try to add
usersi = [321412,124124234,124124]
client(InviteToChannelRequest(
chatid,
usersi
))
participants = client.get_participants(channel_username)
usersi=[]
chatid = client.get_entity(mychat).id
for partic in client.iter_participants(channel_username):
if partic.bot:
print(partic.id," бот")
elif partic.deleted:
print(partic.id, " Удален")
else:
usersi.append(partic.id)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question