Interface MessagePremiumGiftCode

A Telegram Premium gift code was created for the user. Subtype of MessageContent.

interface MessagePremiumGiftCode {
    @type: "messagePremiumGiftCode";
    amount: number;
    code: string;
    creator_id: MessageSender;
    cryptocurrency: string;
    cryptocurrency_amount: string;
    currency: string;
    is_from_giveaway?: boolean;
    is_unclaimed?: boolean;
    month_count: number;
    sticker: Sticker;
    text: FormattedText;
}

Properties

@type: "messagePremiumGiftCode"
amount: number

The paid amount, in the smallest units of the currency; 0 if unknown.

code: string

The gift code.

creator_id: MessageSender

Identifier of a chat or a user that created the gift code; may be null if unknown.

cryptocurrency: string

Cryptocurrency used to pay for the gift; may be empty if none or unknown.

cryptocurrency_amount: string

The paid amount, in the smallest units of the cryptocurrency; 0 if unknown.

currency: string

Currency for the paid amount; empty if unknown.

is_from_giveaway?: boolean

True, if the gift code was created for a giveaway.

is_unclaimed?: boolean

True, if the winner for the corresponding Telegram Premium subscription wasn't chosen.

month_count: number

Number of months the Telegram Premium subscription will be active after code activation.

sticker: Sticker

A sticker to be shown in the message; may be null if unknown.

Message added to the gift.