-
-
Save GenertP/b35278cb6a285be3e074a6ee28365489 to your computer and use it in GitHub Desktop.
Automatically open discord lootboxes
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
token = input("Copy and paste user token: ") | |
import requests, json, base64, time | |
X_Super = {"client_build_number":280346} | |
headers = { | |
'authorization': token, | |
'x-super-properties': base64.b64encode(json.dumps(X_Super).encode('utf-8')).decode('utf-8'), | |
} | |
o=0 | |
ui = 0 | |
while True: | |
response = requests.post('https://discord.com/api/v9/users/@me/lootboxes/open', headers=headers) | |
if 'user_lootbox_data' in response.json(): | |
if 'opened_items' in response.json()['user_lootbox_data']: | |
ui = sum(response.json()['user_lootbox_data']['opened_items'].values())+70 | |
if 'opened_item' in response.json(): | |
o += 1 | |
print("[AutoLootbox] >> Item Opened!", response.json()['opened_item'], "Total Opened:",o, "Inventory Items:", ui) | |
if "retry_after" in response.json(): | |
time.sleep(response.json()["retry_after"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You failed at getting your Discord token.