mirror of
https://github.com/shadoll/playing_now_2_mm.git
synced 2025-12-20 04:27:51 +00:00
Refactor sleep logic in main.py and update status_send.py
This commit is contained in:
@@ -44,7 +44,8 @@ class StatusSend:
|
||||
"expires_at": expires_at.isoformat() if expires_at else None,
|
||||
}
|
||||
now = time.strftime("%H:%M:%S", time.localtime())
|
||||
print(f"{now} Setting status to {self.destination.capitalize()} of {emoji.get("icon")} {text} ⏱️ for {duration} seconds")
|
||||
remaining_time = round(kwargs.get("remaining_time", 0))
|
||||
print(f"{now} Setting status to {self.connector.NAME} of {emoji.get("icon")} {text} ⏱️ for {remaining_time} seconds")
|
||||
try:
|
||||
self.connector.send(data=data)
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user