@tgsnake/skema
    Preparing search index...

    Class Message

    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: {
            date: number;
            editDate?: number;
            editHide?: boolean;
            effect?: bigint;
            entities?: Raw.Vector<TypeMessageEntity>;
            factcheck?: FactCheck;
            forwards?: number;
            fromBoostsApplied?: number;
            fromId?: TypePeer;
            fromScheduled?: boolean;
            fwdFrom?: MessageFwdHeader;
            groupedId?: bigint;
            id: number;
            invertMedia?: boolean;
            legacy?: boolean;
            media?: TypeMessageMedia;
            mediaUnread?: boolean;
            mentioned?: boolean;
            message: string;
            noforwards?: boolean;
            offline?: boolean;
            out?: boolean;
            paidMessageStars?: bigint;
            paidSuggestedPostStars?: boolean;
            paidSuggestedPostTon?: boolean;
            peerId: TypePeer;
            pinned?: boolean;
            post?: boolean;
            postAuthor?: string;
            quickReplyShortcutId?: number;
            reactions?: MessageReactions;
            replies?: MessageReplies;
            replyMarkup?: TypeReplyMarkup;
            replyTo?: TypeMessageReplyHeader;
            reportDeliveryUntilDate?: number;
            restrictionReason?: Raw.Vector<RestrictionReason>;
            savedPeerId?: TypePeer;
            silent?: boolean;
            suggestedPost?: SuggestedPost;
            ttlPeriod?: number;
            viaBotId?: bigint;
            viaBusinessBotId?: bigint;
            videoProcessingPending?: boolean;
            views?: number;
        }

      Returns Raw.Message

    Properties

    _slots: string[]

    Internal array of slot names for the object.

    className: string

    Name of the class.

    classType: string

    Type of the class.

    cls: any = ...

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

    constructorId: number

    Unique identifier for the constructor.

    date: number
    editDate?: number
    editHide?: boolean
    effect?: bigint
    factcheck?: FactCheck
    forwards?: number
    fromBoostsApplied?: number
    fromId?: TypePeer
    fromScheduled?: boolean
    groupedId?: bigint
    id: number
    invertMedia?: boolean
    legacy?: boolean
    mediaUnread?: boolean
    mentioned?: boolean
    message: string
    noforwards?: boolean
    offline?: boolean
    out?: boolean
    paidMessageStars?: bigint
    paidSuggestedPostStars?: boolean
    paidSuggestedPostTon?: boolean
    peerId: TypePeer
    pinned?: boolean

    Optionalpost

    post?: boolean
    postAuthor?: string
    quickReplyShortcutId?: number
    reactions?: MessageReactions
    replies?: MessageReplies
    replyMarkup?: TypeReplyMarkup
    reportDeliveryUntilDate?: number
    restrictionReason?: Raw.Vector<RestrictionReason>
    savedPeerId?: TypePeer
    silent?: boolean
    subclassOfId: number

    Identifier for the parent class (if any).

    suggestedPost?: SuggestedPost
    ttlPeriod?: number
    viaBotId?: bigint
    viaBusinessBotId?: bigint
    videoProcessingPending?: boolean
    views?: number

    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<Raw.Message>

    • 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.