diff --git a/README.md b/README.md index b76e73ff..0ea97fe3 100644 --- a/README.md +++ b/README.md @@ -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 + diff --git a/initsession.py b/initsession.py new file mode 100644 index 00000000..a74638af --- /dev/null +++ b/initsession.py @@ -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() \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..97c7493d --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +telethon \ No newline at end of file