Class UniqueGiftInfo

Hierarchy (View Summary)

Constructors

Properties

Information about the gift

lastResaleStarCount?: number

For gifts bought from other users, the price paid for the gift

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

origin: "upgrade" | "transfer" | "resale"

Origin of the gift. Currently, either “upgrade” for gifts upgraded from regular gifts, “transfer” for gifts transferred from other users or channels, or “resale” for gifts bought from other users

ownedGiftId?: string

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

transferStarCount?: number

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

Accessors

  • get nextTransferAt(): null | Date
  • Date the gift can be transferred. If it is in the past, then the gift can be transferred now

    Returns null | Date

  • get nextTransferTimestamp(): null | number
  • Return the timestamp gift can be transferred. If it is in the past, then the gift can be transferred now

    Returns null | 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 null | string