Use Python
to add member from Source Group to Target Group (migrate members of your group)
- Environment of python 3 (Linux, Window)
- Need about 20 accounts to run (Switches accounts automatically when blocked)
- Your group must have username (public group)
- Account have permission add member to your Target Group (not need join, script will be auto join target group)
- Source group is public group or accounts have joined Source Group
Show more
Note: On Window, use pip
instead of pip3
, python
instead of python3
- Step 1: Install package
telethon
readchar
pip3 install telethon
pip3 install readchar
or
pip3 install -r requirements.txt
Note:
- Step 2: create file config.json base on config.example.json
{
"group_source": "atmcommunityvn",
"group_target": "ATMCommunityOfficial",
"api_id": 1234566,
"api_hash": "57c6f3c72c2f21676d53be2eXXXXXX",
"from_date_active": "20201114",
"accounts": [
"+84Heva",
"+84Love",
"+84Have"
]
}
group_source
: username of Group Source
group_target
: username of Group Target
api_id
andapi_hash
: Need only one (api_id
andapi_hash
), how to get them: create an app in https://my.telegram.org/apps and copy theapi_id
andapi_hash
into the config file
group_target
: username of Group Target
accounts
: list String of your phones
- Step 3: After setting up your
config.json
, runpython3 init_session.py
, enter phone and the code you received
- Step 4: run
python3 get_members.py
to get data user and save file in folderdata
with path:data/atmcommunityvn.json
(atmcommunityvn
is username's Source Group)
{
"user_id": 847587728,
"access_hash": 2393668282771176567,
"username": None
}
Use user_id
and access_hash
to add member. Use username have also use to add member, but something use not have username
One folder is created in folder data
and have some file .json
save data of members. If you change accounts (add more account) you need re-run python3 get_members.py
.
- Step 4: run
python3 add_members.py
to add member fromgroup_source
togroup_target
Logic:- after adding 1 member, sleep 120s / total_client. If you have 2 accounts, it will sleep 60s
- after each account adds 35 members --> sleep 2 hours
- Remove account when there is a Flood, Flood Wait Error
- Break if there are no more accounts
Note: If your account gets blocked, go to https://web.telegram.org/k/#@SpamBot and chat /start to see the time the ban would be lifted
If your account is not blocked, but error FloodWaitError
, in Terminal like as:
and you must wait 77464 seconds
You can Stop The script By crtl+z or crtl+c. type y
Note: current_count.txt save current index. If It is interupt, please check number index in file. If note current index (base on log in Terminal), edit it to correct and re-run.
Telegram Group Official: ATM Community Official
Telegram Group of Vietnamese: ATM Community (Việt Nam)