Skip to content

users

This module contains classes intended to parse and deal with data from Roblox user information endpoints.

User

Bases: BaseUser

Represents a single conversation.

Attributes:

Name Type Description
id int

The id of the current user.

name str

The name of the current user.

display_name str

The display name of the current user.

external_app_display_name Optional[str]

The external app display name of the current user.

is_banned bool

If the user is banned.

description str

The description the current user wrote for themself.

created datetime

When the user created their account.

has_verified_badge bool

If the user has a verified badge.

Source code in roblox/users.py
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
class User(BaseUser):
    """
    Represents a single conversation.

    Attributes:
        id: The id of the current user.
        name: The name of the current user.
        display_name: The display name of the current user.
        external_app_display_name: The external app display name of the current user.
        is_banned: If the user is banned.
        description: The description the current user wrote for themself.
        created: When the user created their account.
        has_verified_badge: If the user has a verified badge.
    """

    def __init__(self, client: Client, data: dict):
        """
        Arguments:
            client: Client object.
            data: The data from the request.
        """
        super().__init__(client=client, user_id=data["id"])

        self._client: Client = client

        self.name: str = data["name"]
        self.display_name: str = data["displayName"]
        self.external_app_display_name: Optional[str] = data["externalAppDisplayName"]
        self.id: int = data["id"]
        self.is_banned: bool = data["isBanned"]
        self.description: str = data["description"]
        self.created: datetime = parse(data["created"])
        self.has_verified_badge: bool = data["hasVerifiedBadge"]

__init__(client, data)

Parameters:

Name Type Description Default
client Client

Client object.

required
data dict

The data from the request.

required
Source code in roblox/users.py
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
def __init__(self, client: Client, data: dict):
    """
    Arguments:
        client: Client object.
        data: The data from the request.
    """
    super().__init__(client=client, user_id=data["id"])

    self._client: Client = client

    self.name: str = data["name"]
    self.display_name: str = data["displayName"]
    self.external_app_display_name: Optional[str] = data["externalAppDisplayName"]
    self.id: int = data["id"]
    self.is_banned: bool = data["isBanned"]
    self.description: str = data["description"]
    self.created: datetime = parse(data["created"])
    self.has_verified_badge: bool = data["hasVerifiedBadge"]