telegramsjs
    Preparing search index...

    Class GiftInfo

    Hierarchy (View Summary)

    Index

    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

    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

    Accessors

    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