Class OwnedGiftRegular

Hierarchy (View Summary)

  • Base
    • OwnedGiftRegular

Constructors

Properties

beUpgraded?: true

True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only

content?: string

Text of the message that was added to the gift

convertStarCount?: number

Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars

entities?: MessageEntities

Special entities that appear in the text

gift: Gift

Information about the regular gift

isPrivate?: true

True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them

isSaved?: true

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

ownedGiftId?: string

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

prepaidUpgradeStarCount?: number

Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift

senderUnixTime: number

Date the gift was sent in Unix time

senderUser: User

Sender of the gift if it is a known user

type: "regular"

Type of the gift, always “regular”

wasRefunded?: true

True, if the gift was refunded and isn't available anymore

Accessors

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