Skip to content

Commit

Permalink
Eliminate unused state tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
jake158 committed Mar 16, 2024
1 parent 8d1867f commit 56d1dbb
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pomodorodiscord/src/richpresence.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Can only update every 15 seconds
import pypresence

CLIENT_ID = '1215345125002059836'
Expand All @@ -7,7 +6,7 @@
class RichPresence(pypresence.Presence):
def __init__(self):
super().__init__(client_id=CLIENT_ID)
self.state = None
# Can only update every 15 seconds
try:
self.connect()
self.default_state()
Expand All @@ -16,12 +15,9 @@ def __init__(self):

def default_state(self):
self.update(state="Idling", details=None, large_image="graytomato")
self.state = "default"

def running_state(self, session, start_time, end_time):
self.update(state=f"Session {session}", details="Studying", start=start_time, end=end_time, large_image="tomato")
self.state = "pomodoro"

def break_state(self, start_time, end_time):
self.update(state="On break", details=None, start=start_time, end=end_time, large_image="greentomato")
self.state = "break"

0 comments on commit 56d1dbb

Please sign in to comment.