Interface SendGift

Sends a gift to another user. May return an error with a message "STARGIFT_USAGE_LIMITED" if the gift was sold out. Request type for Tdjson#sendGift.

interface SendGift {
    @type: "sendGift";
    gift_id: string;
    is_private?: boolean;
    text: FormattedText;
    user_id: number;
}

Properties

@type: "sendGift"
gift_id: string

Identifier of the gift to send.

is_private?: boolean

Pass true to show the current user as sender and gift text only to the gift receiver; otherwise, everyone will be able to see them.

Text to show along with the gift; 0-getOption("gift_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities are allowed.

user_id: number

Identifier of the user that will receive the gift.