discord python webhook
pip install discord-webhook
discord websocket python
import websocket
import json
import pprint
ws = websocket.WebSocket()
# Connect to host url
ws.connect("wss://gateway.discord.gg/?v=6&encoding=json")
# Use ws.send() to send data to server
# Use ws.recv() to get the data sent from server
result = ws.recv()
print "Received: ",result
heartbeat = '{"op": 1,"d": 251}'
p = '{"token": "MY_BOT_TOKEN","properties": {"$os": "linux","$browser": "disco","$device": "disco" },"compress": false, "large_threshold": 250,"shard": [0, 1],"presence": {"game": {},"status": "online","since": null,"afk": false}}'
h = json.loads(heartbeat)
h_json = json.dumps(h)
p_load = json.loads(p)
p_json = json.dumps(p_load)
print(h_json)
ws.send(h_json)
# Use ws.close() to close the WebSocket handshake
result = ws.recv()
print "Received: ",result
ws.send(p_json)
result = ws.recv()
print "Received: ",result
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us