@tgsnake/skema
    Preparing search index...

    Class User

    Represents a base class for TL (Type Language) objects.

    This class provides serialization and deserialization logic for TL objects, as well as utility methods for inspection and JSON conversion.

    • The class is designed to be extended by specific TL object implementations.
    • It mimics some Python class behaviors for compatibility with TL schemas.
    class MyTLObject extends TLObject {
    // Custom implementation
    }

    Hierarchy (View Summary)

    Index

    Constructors

    • Parameters

      • params: {
            accessHash?: bigint;
            applyMinPhoto?: boolean;
            attachMenuEnabled?: boolean;
            bot?: boolean;
            botActiveUsers?: number;
            botAttachMenu?: boolean;
            botBusiness?: boolean;
            botCanEdit?: boolean;
            botChatHistory?: boolean;
            botHasMainApp?: boolean;
            botInfoVersion?: number;
            botInlineGeo?: boolean;
            botInlinePlaceholder?: string;
            botNochats?: boolean;
            botVerificationIcon?: bigint;
            closeFriend?: boolean;
            color?: PeerColor;
            contact?: boolean;
            contactRequirePremium?: boolean;
            deleted?: boolean;
            emojiStatus?: TypeEmojiStatus;
            fake?: boolean;
            firstName?: string;
            id: bigint;
            langCode?: string;
            lastName?: string;
            min?: boolean;
            mutualContact?: boolean;
            phone?: string;
            photo?: TypeUserProfilePhoto;
            premium?: boolean;
            profileColor?: PeerColor;
            restricted?: boolean;
            restrictionReason?: Raw.Vector<RestrictionReason>;
            scam?: boolean;
            self?: boolean;
            sendPaidMessagesStars?: bigint;
            status?: TypeUserStatus;
            storiesHidden?: boolean;
            storiesMaxId?: number;
            storiesUnavailable?: boolean;
            support?: boolean;
            username?: string;
            usernames?: Raw.Vector<Username>;
            verified?: boolean;
        }

      Returns User

    Properties

    _slots: string[]

    Internal array of slot names for the object.

    accessHash?: bigint
    applyMinPhoto?: boolean
    attachMenuEnabled?: boolean
    bot?: boolean
    botActiveUsers?: number
    botAttachMenu?: boolean
    botBusiness?: boolean
    botCanEdit?: boolean
    botChatHistory?: boolean
    botHasMainApp?: boolean
    botInfoVersion?: number
    botInlineGeo?: boolean
    botInlinePlaceholder?: string
    botNochats?: boolean
    botVerificationIcon?: bigint
    className: string

    Name of the class.

    classType: string

    Type of the class.

    closeFriend?: boolean
    cls: any = ...

    Reference to the constructor of the current class (late static binding).

    color?: PeerColor
    constructorId: number

    Unique identifier for the constructor.

    contact?: boolean
    contactRequirePremium?: boolean
    deleted?: boolean
    emojiStatus?: TypeEmojiStatus
    fake?: boolean
    firstName?: string
    id: bigint
    langCode?: string
    lastName?: string
    min?: boolean
    mutualContact?: boolean
    phone?: string
    premium?: boolean
    profileColor?: PeerColor
    restricted?: boolean
    restrictionReason?: Raw.Vector<RestrictionReason>
    scam?: boolean
    self?: boolean
    sendPaidMessagesStars?: bigint
    storiesHidden?: boolean
    storiesMaxId?: number
    storiesUnavailable?: boolean
    subclassOfId: number

    Identifier for the parent class (if any).

    support?: boolean
    username?: string
    usernames?: Raw.Vector<Username>
    verified?: boolean

    Methods

    • Reads data from the provided BytesIO instance and processes it using the associated class's read method.

      Parameters

      • data: BytesIO

        The BytesIO instance containing the data to be read.

      • ...args: any[]

        Additional arguments to be passed to the class's read method.

      Returns Promise<any>

      A promise that resolves with the result of the read operation.

    • Generate the TLObject from buffer.

      Parameters

      • _data: BytesIO

        BytesIO class from TLObject will be convert to TLObject class.

      • ..._args: any[]

      Returns Promise<User>

    • Serializes the provided arguments into a Buffer.

      Parameters

      • ..._args: any[]

        The arguments to be serialized.

      Returns Buffer

      A Buffer containing the serialized data.

      This is a static method. The current implementation returns an empty Buffer.