telegramsjs
    Preparing search index...

    Class OwnedGiftUnique

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    beTransferred?: true

    True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only

    Information about the unique gift

    isSaved?: true

    True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only

    nextTransferUnixTime?: number

    Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now

    ownedGiftId?: string

    Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only

    senderUnixTime: number

    Date the gift was sent in Unix time

    senderUser: User

    Sender of the gift if it is a known user

    transferStarCount?: number

    Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift

    type: "unique"

    Type of the gift, always “unique”

    Accessors

    • get nextTransferAt(): Date | null

      Date the gift can be transferred. If it is in the past, then the gift can be transferred now

      Returns Date | null

    • get nextTransferTimestamp(): number | null

      Return the timestamp gift can be transferred. If it is in the past, then the gift can be transferred now

      Returns number | null

    • get senderAt(): Date

      Date the message was sent. It is always a positive number, representing a valid date

      Returns Date

    • get senderTimestamp(): number

      Return the timestamp message was sent, in milliseconds

      Returns number

    Methods

    • Protected

      Creates a clone of the current instance

      Returns Base

      A clone of the current instance

    • Protected

      Patches the current instance with new data

      Parameters

      • data: Record<string, any>

        The data to patch the instance with

      Returns Record<string, any>

      The patched data

    • 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

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

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