Skip to content

Commit 3f4ac8e

Browse files
authored
Update presence.py (#116)
Added user field to Presence class
1 parent 95d24a0 commit 3f4ac8e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

roblox/presence.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
if TYPE_CHECKING:
2121
from .client import Client
22+
from .bases.baseuser import BaseUser
2223
from .utilities.types import UserOrUserId
2324

2425

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

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

77-
# self.user: BaseUser = BaseUser(self._client, data["userId"])
79+
self.user: BaseUser = client.get_base_user(data["userId"])
7880
self.last_online: datetime = parse(data["lastOnline"])
7981

8082
def __repr__(self):

0 commit comments

Comments
 (0)