Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from pypresence import Presence # The simple rich presence client in pypresence
- import time
- import psutil
- client_id = "" # Put your Client ID in here
- RPC = Presence(client_id) # Initialize the Presence client
- data = None
- RPC.connect() # Start the handshake loop
- # RPC.update(
- # state="LawMixer's SCP:F",
- # details="Status: Programming",
- # 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"}],
- # large_image="maingroup", large_text="here u go",
- # small_image="images", small_text="programming"
- # )
- while True:
- for proc in psutil.process_iter():
- # This is an example of structural pattern matching added in Python 3.10 | Tutorial: https://www.python.org/dev/peps/pep-0636/
- match proc.name().lower():
- case "robloxstudiolauncherbeta.exe":
- print("3")
- RPC.update(
- state="LawMixer's SCP:F",
- details="Status: Programming",
- # 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"}],
- large_image="maingroup", large_text="here u go",
- small_image="images", small_text="programming"
- )
- break
- case "brave.exe":
- print("2")
- RPC.update(
- state="Brave Brower",
- details="Status: Looking at stuff",
- )
- break
- case _:
- print(3)
- RPC.clear()
- break
- time.sleep(20)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement