Advertisement
LawMixer

issue

Aug 20th, 2022
704
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.85 KB | None | 0 0
  1. from pypresence import Presence  # The simple rich presence client in pypresence
  2. import time
  3. import psutil
  4.  
  5. client_id = ""  # Put your Client ID in here
  6. RPC = Presence(client_id)  # Initialize the Presence client
  7. data = None
  8.  
  9. RPC.connect()  # Start the handshake loop
  10.  
  11. # RPC.update(
  12. #     state="LawMixer's SCP:F",
  13. #     details="Status: Programming",
  14. #     buttons=[{"label": "Roblox Group", "url": "https://www.roblox.com/groups/4800717/SCP-F-Special-Containment-Procedures-Foundation#!/about"}, {"label": "Discord Server", "url": "https://discord.gg/X33juJwjS6"}],
  15. #     large_image="maingroup", large_text="here u go",
  16. #     small_image="images", small_text="programming"
  17.  
  18. #     )
  19. while True:
  20.     for proc in psutil.process_iter():
  21.         # This is an example of structural pattern matching added in Python 3.10 | Tutorial: https://www.python.org/dev/peps/pep-0636/
  22.  
  23.         match proc.name().lower():
  24.             case "robloxstudiolauncherbeta.exe":
  25.                 print("3")
  26.                 RPC.update(
  27.                     state="LawMixer's SCP:F",
  28.                     details="Status: Programming",
  29.                     # buttons=[{"label": "Roblox Group", "url": "https://www.roblox.com/groups/4800717/SCP-F-Special-Containment-Procedures-Foundation#!/about"}, {"label": "Discord Server", "url": "https://discord.gg/X33juJwjS6"}],
  30.                     large_image="maingroup", large_text="here u go",
  31.                     small_image="images", small_text="programming"
  32.                 )
  33.                 break
  34.             case "brave.exe":
  35.                 print("2")
  36.                 RPC.update(
  37.                     state="Brave Brower",
  38.                     details="Status: Looking at stuff",
  39.                 )
  40.                 break
  41.             case _:
  42.                 print(3)
  43.                 RPC.clear()
  44.                 break
  45.     time.sleep(20)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement