Skip to content

MessagePremiumGiftCode

Type · TDLib 1.8.67 · d1085f9c

A Telegram Premium gift code was created for the user

MessagePremiumGiftCode(
  creator_id: MessageSender,
  text: FormattedText,
  is_from_giveaway: Bool,
  is_unclaimed: Bool,
  currency: string,
  amount: int53,
  cryptocurrency: string,
  cryptocurrency_amount: int64,
  month_count: int32,
  day_count: int32,
  sticker: Sticker,
  code: string
) → MessageContent

creator_id

MessageSender

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

text

FormattedText

Message added to the gift

is_from_giveaway

Bool

True, if the gift code was created for a giveaway

is_unclaimed

Bool

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

currency

string

Currency for the paid amount; empty if unknown

amount

int53

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

cryptocurrency

string

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

cryptocurrency_amount

int64

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

month_count

int32

Number of months the Telegram Premium subscription will be active after code activation; 0 if the number of months isn't integer

day_count

int32

Number of days 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

code

string

The gift code