Interface Gift

Describes a gift that can be sent to another user or channel chat.

interface Gift {
    @type: "gift";
    default_sell_star_count: number;
    first_send_date: number;
    id: string;
    is_for_birthday?: boolean;
    is_premium?: boolean;
    last_send_date: number;
    next_send_date: number;
    overall_limits: GiftPurchaseLimits;
    publisher_chat_id: number;
    star_count: number;
    sticker: Sticker;
    upgrade_star_count: number;
    user_limits: GiftPurchaseLimits;
}

Properties

@type: "gift"
default_sell_star_count: number

Number of Telegram Stars that can be claimed by the receiver instead of the regular gift by default. If the gift was paid with just bought Telegram Stars, then full value can be claimed.

first_send_date: number

Point in time (Unix timestamp) when the gift was send for the first time; for sold out gifts only.

id: string

Unique identifier of the gift.

is_for_birthday?: boolean

True, if the gift is a birthday gift.

is_premium?: boolean

True, if the gift can be bought only by Telegram Premium subscribers.

last_send_date: number

Point in time (Unix timestamp) when the gift was send for the last time; for sold out gifts only.

next_send_date: number

Point in time (Unix timestamp) when the gift can be sent next time by the current user; can be 0 or a date in the past. If the date is in the future, then call canSendGift to get the reason, why the gift can't be sent now.

overall_limits: GiftPurchaseLimits

Number of times the gift can be purchased all users; may be null if not limited.

publisher_chat_id: number

Identifier of the chat that published the gift; 0 if none.

star_count: number

Number of Telegram Stars that must be paid for the gift.

sticker: Sticker

The sticker representing the gift.

upgrade_star_count: number

Number of Telegram Stars that must be paid to upgrade the gift; 0 if upgrade isn't possible.

user_limits: GiftPurchaseLimits

Number of times the gift can be purchased by the current user; may be null if not limited.