Skip to content

Commit

Permalink
UPDATE README.md
Browse files Browse the repository at this point in the history
create requirements, initsession, update readme.md
  • Loading branch information
South committed Dec 15, 2019
1 parent 70ea616 commit 2114654
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,24 @@
# addmember-telegram
Add member auto to telegram group

### init session
run init session to create session for on phone

+ create app in https://my.telegram.org/apps and have api_id, api_hash
+ backup session to somewhere

### create phone.txt

create phone.txt have format same phone.example.txt
phone;api_id;api_hash

### getdata.py

+ get groups, users in group and save folder data

### addmember.py
change id group source, target, base on file data/group/+84....csv (need upgrade in the future)

group_target_id = 1331409327
group_source_id = 1166894130

19 changes: 19 additions & 0 deletions initsession.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from telethon import TelegramClient, connection
import logging
from telethon import sync, TelegramClient, events

logging.basicConfig(level=logging.WARNING)

api_id = 11007498
api_hash = '57c6f3c72c2f21676d53be2e1deab3aa'
phone = '+84976081803'


client = TelegramClient(phone, api_id, api_hash, connection=connection.ConnectionTcpMTProxyRandomizedIntermediate, proxy=('116.203.2.245', 1337, 'dd81b667f85e7e5d358de3b8e4ade6302f'))

client.start()
if client.is_user_authorized():
print('dang nhap thanh cong')
else:
print('dang nhap khong thanh cong')
client.disconnect()
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
telethon

0 comments on commit 2114654

Please sign in to comment.