Skip to content

Commit

Permalink
Update presence.py (#116)
Browse files Browse the repository at this point in the history
Added user field to Presence class
  • Loading branch information
Jodenee authored Feb 16, 2024
1 parent 95d24a0 commit 3f4ac8e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion roblox/presence.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

if TYPE_CHECKING:
from .client import Client
from .bases.baseuser import BaseUser
from .utilities.types import UserOrUserId


Expand All @@ -44,6 +45,7 @@ class Presence:
job: The job of the root place that the user is playing or editing.
universe: The universe the user is playing or editing.
last_online: When the user was last online.
user: The user this presence belongs to.
"""

def __init__(self, client: Client, data: dict):
Expand Down Expand Up @@ -74,7 +76,7 @@ def __init__(self, client: Client, data: dict):
universe_id=data["universeId"]
) if data.get("universeId") else None

# self.user: BaseUser = BaseUser(self._client, data["userId"])
self.user: BaseUser = client.get_base_user(data["userId"])
self.last_online: datetime = parse(data["lastOnline"])

def __repr__(self):
Expand Down

0 comments on commit 3f4ac8e

Please sign in to comment.