DenizShabani / telegramscraper

Scraper and adder for Telegram supporting multiple accounts at the same time. Adds via Telegram API and only by username. For adding via ID and not needing Telgram API contact me.
https://t.me/GitHubScriptsHelp
MIT License
371 stars 168 forks source link

[adding 25 member only] Trying to increase. Add by ID to increase. Filter member to increase. #15

Open EniMusguera opened 2 years ago

EniMusguera commented 2 years ago

Hello. I'm trying to modify it instead of adding with the username, the id.

The intention of doing this is because I add an average of 25 people per telegram. I'm trying to increase this number.

I suppose that doing this method and filtering if the user is already in the group or not, I can increase this number.

UPDATE: This "pass" doesn't work either. I think the correct thing would be to filter the csv of the members that are already in the same group. It seems to me the best way.

If anyone can help me, thank you very much! Original (works): try: if user['username'] == "": continue user_to_add = client.get_input_entity(user['username']) client(InviteToChannelRequest(entity, [user_to_add])) Mod ID (doesnt works): try: if user['user_id'] == "": pass user_to_add = client.get_input_entity(user['user_id']) client(InviteToChannelRequest(entity, [user_to_add]))

If that doesn't work, you could simply "pass" instead of "continue". for user in users: if user['username'] == "": pass