forked from Heyfrenzy/discord-auth-script
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjoiner.py
More file actions
83 lines (66 loc) · 2.03 KB
/
Copy pathjoiner.py
File metadata and controls
83 lines (66 loc) · 2.03 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import os, sys
import requests
import json
import time
from threading import Thread
tkn = "MTA5MzA1NTI4MTIwNzk4ODI4NA.G-fXLl.TiVeHEoJatfoJfVYOly_JlFqQhlmIZfQrnLREA"
API_ENDPOINT = 'https://canary.discord.com/api/v9'
CLIENT_ID = '1093055281207988284'
CLIENT_SECRET = ""
REDIRECT_URI = 'https://verify.exploit.tk'
def add_to_guild(access_token, userID , guild_Id ):
while True:
url = f"{API_ENDPOINT}/guilds/{guild_Id}/members/{userID}"
botToken = tkn
data = {
"access_token" : access_token,
}
headers = {
"Authorization" : f"Bot {botToken}",
'Content-Type': 'application/json'
}
response = requests.put(url=url, headers=headers, json=data)
print(response.text)
if response.status_code in (200, 201, 204):
if "joined" not in response.text:
print(f"[INFO]: user {userID} already in {guild_Id}")
print(f"[INFO]: successfully added {userID} to {guild_Id}")
break
elif response.status_code == 429:
print(response.status_code)
print(response.text)
if 'retry_after' in response.text:
sleepxd = int(response.json()['retry_after']) + 0.5
print("sleeping for:", sleepxd, "seconds")
time.sleep(sleepxd)
continue
else:
os.system("kill 1")
break
f = open("database.txt", "r").readlines()
guild = input("guild: ")
starter = int(input("start from: "))
amount = input("amount: ")
if "all" in amount.lower():
amount = int(len(open("database.txt", "r").readlines()))
else:
amount = int(amount)
print("AMOUNT:", amount)
xx = 0
added = 0
for line in f:
xx += 1
if xx < starter:
continue
elif amount < added:
sys.exit()
line = line.strip()
line = line.split(":")
key = line[0]
value = line[1]
#time.sleep(5)
added += 1
print(added)
# Thread(target=add_to_guild, args=(value, key, guild,)).start()
add_to_guild(value, key, guild)
# add_to_guild(value, key, "996021987904331798")