If you want to online tokens in bulk, consider checking out my store: phantom.sellix.io! ☄️
⭐ Feel free to star the repository if this helped you!
By using this code, you are automating your Discord Account. This is against Discord's Terms of Service and Community Guidelines. If not used properly, your account(s) might get suspended or terminated by Discord. I, the developer, am not responsible for any consequences that may arise from the use of this code. Use this software at your own risk and responsibility. Learn more about Discord's Terms of Service and Community Guidelines.
DO NOT GIVE YOUR DISCORD TOKENS TO ANYONE.
You will need an user token inorder to use this code. You can obtain it by doing the following:
Ctrl+Shift+I
to open Chrome Developer ToolsNetwork
Tab/api
in the filter search boxscience
as the Name
Headers
Authorization
. Copy the line next to it.TOKEN
as the key and your token as the value (Video)This repository includes a Dockerfile
and a docker-compose.yml
file. Since pre-built images are not available, you'll need to build them yourself.
import sys
import json
import time
import requests
import websocket
status = "online"
custom_status = "youtube.com/@SealedSaucer" #If you don't need a custom status on your profile, just put "" instead of "youtube.com/@SealedSaucer"
usertoken = "Add your token here"
headers = {"Authorization": usertoken, "Content-Type": "application/json"}
validate = requests.get('https://discordapp.com/api/v9/users/@me', headers=headers)
if validate.status_code != 200:
print("[ERROR] Your token might be invalid. Please check it again.")
sys.exit()
userinfo = requests.get('https://discordapp.com/api/v9/users/@me', headers=headers).json()
username = userinfo["username"]
discriminator = userinfo["discriminator"]
userid = userinfo["id"]
def onliner(token, status):
ws = websocket.WebSocket()
ws.connect("wss://gateway.discord.gg/?v=9&encoding=json")
start = json.loads(ws.recv())
heartbeat = start["d"]["heartbeat_interval"]
auth = {
"op": 2,
"d": {
"token": token,
"properties": {
"$os": "Windows 10",
"$browser": "Google Chrome",
"$device": "Windows",
},
"presence": {"status": status, "afk": False},
},
"s": None,
"t": None,
}
ws.send(json.dumps(auth))
cstatus = {
"op": 3,
"d": {
"since": 0,
"activities": [
{
"type": 4,
"state": custom_status,
"name": "Custom Status",
"id": "custom",
#Uncomment the below lines if you want an emoji in the status
#"emoji": {
#"name": "emoji name",
#"id": "emoji id",
#"animated": False,
#},
}
],
"status": status,
"afk": False,
},
}
ws.send(json.dumps(cstatus))
online = {"op": 1, "d": "None"}
time.sleep(heartbeat / 1000)
ws.send(json.dumps(online))
def run_onliner():
print(f"Logged in as {username}#{discriminator} ({userid}).")
while True:
onliner(usertoken, status)
time.sleep(50)
run_onliner()
requirements.txt
file and copy and paste the file contents inside requirements.txt without the Flask
modulepip install -r requirements.txt
python filename.py
kill 1
- Wait for the repl to reload
- Run the repl again
pip install websocket
in the shell
pip install websocket-client
in the shell
If you have any issues or doubts regarding this, feel free to contact me.
❤️ Online Forever is licensed under GNU General Public License.