Last active
August 5, 2021 13:16
-
-
Save LordOfPolls/8bf1bac70ab8fa2190de203a7a2b5bd0 to your computer and use it in GitHub Desktop.
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 random | |
import time | |
from pypresence import Presence | |
print("Connecting to client...") | |
client_id = "834696811729125417" # the app ID you're playing | |
RPC = Presence(client_id=client_id) | |
RPC.connect() | |
buttons = [ | |
{"label": "⭐ View The Repo", "url": "https://github.com/LordOfPolls/dis_snek"}, | |
{"label": "💬 Join Our Server", "url": "https://discord.gg/hpfNhH8BsY"}, | |
] | |
lines = [ | |
"Reject d.py, embrace snek", | |
"snek time", | |
"Discord API V9", | |
"Interaction Support", | |
"Fully Slotted And Ready To Go", | |
"__init__? nah attrs", | |
"but its not pythonic", | |
"fully interactive", | |
"Slash commands are better", | |
] | |
while True: | |
print("Updating Presence") | |
RPC.update( | |
details=random.choice(lines), | |
state="🔨 Working on the API", | |
large_image="snek", | |
large_text="A happy snek", | |
buttons=buttons, | |
) | |
# keep alive | |
time.sleep(15) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/qwertyquerty/pypresence