Git Product home page Git Product logo

addmember-telegram's Introduction

addmember-telegram

Use python 3 to add member from Group A to Group B (migrate member of your group)

Require

  • Environment of python 3 (Linux, Window)
  • Need about 20 accounts to run (Avoid block account Telegram)
  • Each account need in Source Group and Target Group
  • Notice you region phone
  • Your group is Supper group

https://www.wikihow.com/Convert-a-Telegram-Group-to-a-Supergroup-on-PC-or-Mac

Supper group Upgraded Supper group

Guide line

  • Step 1: Install package telethon
pip install telethon
  • Step 2: Create file config.json Copy file config.json from config.example.json
{
	"group_target": 1398120166, --> id target group
	"group_source": 1490302444, --> id source group
	"accounts": [ --> array account
		{
			"phone": "+84XXXX",
			"api_id": 1234566,
			"api_hash": "57c6f3c72c2f21676d53be2eXXXXXX"
		}
	]
}

group_target and group_source: after run get_data.py and check file in data/group accounts: list account Telegram; each phone, create app in https://my.telegram.org/apps and have api_id, api_hash

  • Step 3: After have file config.json, run python init_session.py, enter phone and the code you received

Init session

  • Step 4: run python get_data.py to get data of group, data user and save file in folder data

Get data Data after Get

{
    "user_id": "847587728",
    "access_hash": "2393668282771176567",
    "username": "None"
}

One group have one list user (list username), but each account Telegram have list User (difference user_id, access_hash). Use user_id and access_hash to add member, so you need get list user of each account Telegram. Note: Use username have also use to add member, but something use not have username

After run get data, check again file in data/group and edit file config to change group_target, group_source, which you want to add.

  • Step 5: run python add_member.py to add member from group_source to group_target Logic:
    • after add 1 member, sleep 2 minutes
    • each account add 35 member --> sleep 15 minutes
    • Remove account when Exception Flood
    • Break if don't have account

Note: If your account blocked, get link https://web.telegram.org/#/im?p=@SpamBot and chat /start to see time released

Get data

Done!

Ps:

Because some people interesting my repository create some issue, inbox Telegram. I don't have time to solve it, so I update your script to be good. I will open issue and try to resolved it. But some thing about basic language python, please search Internet before create issue! Thanks!

addmember-telegram's People

Contributors

south1907 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.