Class BaseUser

Base User class that user class will inherit from.

Hierarchy

Constructors

Properties

#client: Client<boolean>

Client instance attached to the Object

#endpointUrl: string = Endpoints.account

Endpoint url the object will request to

#payload: APIUserProfile

The payload of the object.

Accessors

  • get blockType(): null | "user" | "installation"
  • The block type if the user is blocked

    Returns null | "user" | "installation"

  • get canChat(): boolean
  • Can the Client chat with the user?
    ? Not checked by the backend

    Alias

    is_available_for_chat

    Returns boolean

  • get chatPrivacy(): "closed" | "public" | "subscribers"
  • The user's chat privacy

    Returns "closed" | "public" | "subscribers"

  • get endpointUrl(): string
  • Endpoint url for requests to update the payload

    Returns string

  • set endpointUrl(value: string): void
  • Parameters

    • value: string

    Returns void

  • get isAvailableForChat(): boolean
  • Can the Client chat with the user?
    ? Not checked by the backend

    Alias

    can_chat

    Returns boolean

  • get nickColor(): null | "55FF00" | "660000" | "e0b400" | "a078f0" | "ff3e52" | "ffffff"
  • The nick color of the user if they have one, else null

    Returns null | "55FF00" | "660000" | "e0b400" | "a078f0" | "ff3e52" | "ffffff"

  • get payload(): Payload
  • Get the payload of the object

    Returns Payload

  • set payload(payload: Partial<Payload>): void
  • Updates the payload of the object.

    Returns

    The current instance

    Parameters

    • payload: Partial<Payload>

      The payload to merge into the current instance

    Returns void

  • get totalRepublishedPosts(): number
  • How many posts the has that are republishes (NOT original)

    Returns number

Methods

  • When concatenated with a string, this automatically returns the user's nick instead of the User object.

    Example

    console.log(Hello from ${user}!); // Logs: Hello from iFunnyChef

    Returns string

Generated using TypeDoc