Layer 220
PaymentsCheckedGiftCode
Contains info about a Telegram Premium giftcode link.
constructor
payments.checkedGiftCode#284a1096 flags:# via_giveaway:flags.2?true from_id:flags.4?Peer giveaway_msg_id:flags.3?int to_id:flags.0?long date:int months:int used_date:flags.1?int chats:Vector<Chat> users:Vector<User> = payments.CheckedGiftCode;
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| ViaGiveaway | flags.2?true | Whether this giftcode was created by a giveaway. |
| FromId | flags.4?Peer | The peer that created the gift code. |
| GiveawayMsgId | flags.3?int | Message ID of the giveaway in the channel specified in from_id. |
| ToId | flags.0?long | The destination user of the gift. |
| Date | int | Creation date of the gift code. |
| Months | int | Duration in months of the gifted Telegram Premium subscription. |
| UsedDate | flags.1?int | When was the giftcode imported, if it was imported. |
| Chats | Vector<Chat> | Mentioned chats |
| Users | Vector<User> | Mentioned users |
Returns
payments.CheckedGiftCodeGogram Example
// Creating PaymentsCheckedGiftCode constructor obj := &tg.PaymentsCheckedGiftCode{ Date: 0, Months: 0, Chats: []tg.Chat{&tg.Chat{}}, Users: []tg.User{&tg.User{}}, // Optional fields: // ViaGiveaway: true, // FromId: &tg.Peer{}, // GiveawayMsgId: 0, // ToId: int64(0), // ... more optional fields }