Skip to content

friends

Contains classes related to Roblox friend data and parsing.

Friend

Bases: User

Represents a friend.

Attributes:

Name Type Description
is_online Optional[bool]

Whether the user is currently online.

presence_type Optional[int]

Their presence type. Don't use this.

is_deleted bool

Whether the account is deleted.

friend_frequent_rank int

Unknown

Source code in roblox/friends.py
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
class Friend(User):
    """
    Represents a friend.

    Attributes:
        is_online: Whether the user is currently online.
        presence_type: Their presence type. Don't use this.
        is_deleted: Whether the account is deleted.
        friend_frequent_rank: Unknown
    """

    def __init__(self, client: Client, data: dict):
        """
        Arguments:
            data: The data we get back from the endpoint.
            client: The Client object, which is passed to all objects this Client generates.
        """
        super().__init__(client=client, data=data)

        self.is_online: Optional[bool] = data.get("isOnline")
        self.presence_type: Optional[int] = data.get("presenceType")
        self.is_deleted: bool = data["isDeleted"]
        self.friend_frequent_rank: int = data["friendFrequentRank"]

__init__(client, data)

Parameters:

Name Type Description Default
data dict

The data we get back from the endpoint.

required
client Client

The Client object, which is passed to all objects this Client generates.

required
Source code in roblox/friends.py
26
27
28
29
30
31
32
33
34
35
36
37
def __init__(self, client: Client, data: dict):
    """
    Arguments:
        data: The data we get back from the endpoint.
        client: The Client object, which is passed to all objects this Client generates.
    """
    super().__init__(client=client, data=data)

    self.is_online: Optional[bool] = data.get("isOnline")
    self.presence_type: Optional[int] = data.get("presenceType")
    self.is_deleted: bool = data["isDeleted"]
    self.friend_frequent_rank: int = data["friendFrequentRank"]