Class PaidMedia

Hierarchy (view full)

Constructors

Properties

duration?: number

Duration of the media in seconds as defined by the sender

height?: number

Media height as defined by the sender

photo?: Photo[]

The photo

video?: Video

The video

width?: number

Media width as defined by the sender

Accessors

Methods

  • Protected

    Creates a clone of the current instance

    Returns Base

    A clone of the current instance

  • Parameters

    • data: PaidMedia

      Data about the describes paid media

    Returns PaidMedia

  • Protected

    Updates the current instance with new data and returns a clone of the updated instance

    Parameters

    • data: Record<string, any>

      The data to update the instance with

    Returns Base

    A clone of the updated instance

  • Returns this is PaidMedia & {
        photo?: undefined;
        video?: undefined;
    }

  • Flatten an object. Any properties that are collections will get converted to an array of keys.

    Parameters

    • OptionalpropsRecursive: boolean

      Optional. If true, calls toJSON method on nested objects.

    • Rest...props: Record<string, string | boolean>[]

      Optional. Specific properties to include/exclude, or rename.

    Returns Record<string, any>

    Flattened object.

  • Returns the id instance Chat, User, ChatMember and other

    Returns null | string