Skip to content

Commit

Permalink
Add Rich Presence boilerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
jake158 committed Mar 7, 2024
1 parent 73819b1 commit 25000ab
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions pomodorodiscord/src/richpresence.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Can only update every 15 seconds
import pypresence

CLIENT_ID = '1215345125002059836'


class RichPresence(pypresence.Presence):
def __init__(self):
super().__init__(client_id=CLIENT_ID)
try:
self.connect()
self.default_state()
except Exception as e:
print(f"Failed to connect to Discord: {e}")

def default_state(self):
self.update(state="Placeholder",
details="Placeholder details", large_image="tomato")

def begin_pomodoro(self):
pass

def begin_break(self):
pass

0 comments on commit 25000ab

Please sign in to comment.