Advertisement
irokemr

Discord RPC python

Jun 5th, 2021
1,862
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.71 KB | None | 0 0
  1. from pypresence import Presence
  2. import requests
  3. import json
  4. import time
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11. url = requests.get("https://jose89fcb.webcindario.com/diasFortnite/dias.php")
  12. ProgressoFortnite = json.loads(url.text)
  13.  
  14. ProgressoFN = url.json()['DiasFN']
  15.  
  16.  
  17. client_id = ' '
  18. RPC = Presence(client_id)
  19. RPC.connect()
  20.  
  21. RPC.update(
  22.     details = "ger4t5gr45e",
  23.     state = ProgressoFN,
  24.    
  25.     large_image = "logofn",
  26.     large_text = "Progresso Fortnite",
  27.     small_image = "logofn",
  28.     small_text = "Progresso Fortnite",
  29.    
  30.    
  31.  
  32.     buttons = [
  33.         {"label": "yt", "url": "https://youtube.com/"},
  34.         {"label": "tw", "url": "https://twitter.com/"}
  35.     ],
  36.     start=time.time()
  37. )
  38.  
  39.  
  40. input()
  41.  
  42.  
  43.  
  44.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement