@tgsnake/skema
    Preparing search index...

    Class MsgContainer

    tgsnake - Telegram MTProto library for javascript or typescript. Copyright (C) 2025 tgsnake https://github.com/tgsnake

    THIS FILE IS PART OF TGSNAKE

    tgsnake is a free software: you can redistribute it and/or modify it under the terms of the MIT License as published.

    Hierarchy (View Summary)

    Index

    Constructors

    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.

    messages: Message[]
    subclassOfId: number

    Identifier for the parent class (if any).

    ID: number = 0x73f1f8dc

    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.

    • Serializes the current MsgContainer instance into a Buffer.

      This method writes the container's ID, the number of messages, and then serializes each contained message in order. The resulting Buffer can be used for transmission or storage.

      Returns Buffer

      The serialized representation of the MsgContainer.

    • Reads a MsgContainer instance from the provided BytesIO stream.

      This method reads the number of messages from the stream, then iteratively reads each Message and constructs a new MsgContainer containing all the messages.

      Parameters

      • data: BytesIO

        The BytesIO stream to read from.

      • ..._args: any[]

        Additional arguments (unused).

      Returns Promise<MsgContainer>

      A promise that resolves to a new MsgContainer instance containing the read messages.

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