Created
March 15, 2021 21:09
-
-
Save kynex7510/01895637e64a9b743b4d06c061a2c150 to your computer and use it in GitHub Desktop.
Discord Samsung Galaxy Rich Presence
This file contains hidden or 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
import json | |
from urllib.request import Request,urlopen | |
#update: START, STOP, UPDATE | |
p = json.dumps({"package_name": "com.epicgames.fortnite", "update": "START"}) | |
p = p.encode() | |
req = Request('https://discordapp.com/api/v6/presences', p) | |
req.add_header("Authorization", "your token") | |
req.add_header("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.0) Gecko/20100101 Firefox/86.0") | |
req.add_header("Content-Type", "application/json") | |
data = urlopen(req).read().decode() | |
print(data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment