Skip to content

Commit 1954a04

Browse files
authored
fix: Fix client presence Unix time calculation. (#763)
1 parent 5e0eb5b commit 1954a04

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

interactions/api/models/presence.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ def __init__(self, **kwargs):
209209
)
210210
if self.activities:
211211
self._json["activities"] = [activity._json for activity in self.activities]
212-
if self.status == "idle" and not self._json.get("since"):
212+
if not self._json.get("since"):
213213
# If since is not provided by the developer...
214-
self.since = int(time.time() * 1000)
214+
self.since = int(time.time() * 1000) if self.status == "idle" else 0
215215
self._json["since"] = self.since
216216
if not self._json.get("afk"):
217217
self._json["afk"] = False

0 commit comments

Comments
 (0)