forked from south1907/addmember-telegram
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create requirements, initsession, update readme.md
- Loading branch information
South
committed
Dec 15, 2019
1 parent
70ea616
commit 2114654
Showing
3 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
telethon |