-
Notifications
You must be signed in to change notification settings - Fork 4
/
adder.py
58 lines (52 loc) · 2.56 KB
/
adder.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
from telethon.tl.functions.messages import ImportChatInviteRequest
from telethon.sync import TelegramClient
import os
import glob
from time import sleep
print('''
▀████ ▐████▀ ▄█ ▄█ ▄█ ▄████████ ███▄▄▄▄
███▌ ████▀ ███ ███ ███ ███ ███ ███▀▀▀██▄
███ ▐███ ███▌ ███ ███ ███ █▀ ███ ███
▀███▄███▀ ███▌ ███ ███ ▄███▄▄▄ ███ ███
████▀██▄ ███▌ ███ ███ ▀▀███▀▀▀ ███ ███
▐███ ▀███ ███ ███ ███ ███ █▄ ███ ███
▄███ ███▄ ███ ███▌ ▄ ███▌ ▄ ███ ███ ███ ███
████ ███▄ █▀ █████▄▄██ █████▄▄██ ██████████ ▀█ █▀
By @TheDarkW3b ▀ ▀
''')
print("\nMust Read README.txt Before Using....\n")
print("Invite Link Example : https://t.me/joinchat/AAAAAFFszQPyPEZ7wgxLte\n")
channel = input("Enter Channel Invite Link :- ")
new_link = channel.split("/")
try:
os.chdir("sessions")
except:
print("\nFolder Named 'sessions' Not Found.... Exiting ...")
sleep(3)
exit()
sfiles = []
for files in glob.glob("*.session"):
sfiles.append(files)
total_len = len(sfiles)
if total_len == int(0):
print("\nNo Sessions In 'sessions' Folder.. First Run Sessions Creator.exe and Create sessions")
sleep(3)
exit()
print(f"\nTotal {total_len} Session Files Found\n")
indexx = 0
while indexx < total_len:
document_name = sfiles[indexx]
indexing = document_name.split(".")
session_name = indexing[0]
client = TelegramClient(session_name, api_id=1170033,
api_hash="5b2875309174291a0d6e03802e6c58c2").start()
try:
client(ImportChatInviteRequest(new_link[4]))
print(f"Joined With {session_name}")
except Exception as e:
print(e)
print("Invite Link Is Revoked... or Fix Session Later by Creating A new one")
print(f"Skipping {session_name} ...\n")
continue
indexx += 1
input("Press Enter To Exit :-) ")