Class UniqueGift

Hierarchy (View Summary)

Constructors

Properties

backdrop: {
    colors: { center: number; edge: number; symbol: number; text: number };
    name: string;
    rarityPerMille: number;
}

Backdrop of the gift

Type declaration

  • colors: { center: number; edge: number; symbol: number; text: number }

    Colors of the backdrop

    • center: number

      The color in the center of the backdrop in RGB format

    • edge: number

      The color on the edges of the backdrop in RGB format

    • symbol: number

      The color to be applied to the symbol in RGB format

    • text: number

      The color for the text on the backdrop in RGB format

  • name: string

    Name of the backdrop

  • rarityPerMille: number

    The number of unique gifts that receive this backdrop for every 1000 gifts upgraded

baseName: string

Human-readable name of the regular gift from which this unique gift was upgraded

model: { name: string; rarityPerMille: number; sticker: Sticker }

Model of the gift

Type declaration

  • name: string

    Name of the model

  • rarityPerMille: number

    The number of unique gifts that receive this model for every 1000 gifts upgraded

  • sticker: Sticker

    The sticker that represents the unique gift

name: string

Unique name of the gift. This name can be used in https://t.me/nft/... links and story areas

number: number

Unique number of the upgraded gift among gifts upgraded from the same regular gift

symbol: { name: string; rarityPerMille: number; sticker: Sticker }

Symbol of the gift

Type declaration

  • name: string

    Name of the model

  • rarityPerMille: number

    The number of unique gifts that receive this model for every 1000 gifts upgraded

  • sticker: Sticker

    The sticker that represents the unique 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 null | string