InputInvoicePremiumGiftStars

class pyrogram.raw.types.InputInvoicePremiumGiftStars

Used to gift a Telegram Premium subscription to another user, paying with Telegram Stars.

Constructor of InputInvoice.

Details:
  • Layer: 223

  • ID: DABAB2EF

Parameters:
  • user_id (InputUser) – Who will receive the gifted subscription.

  • months (int 32-bit) – Duration of the subscription in months, must be one of the options with currency == “XTR” returned by payments.getPremiumGiftCodeOptions.

  • message (TextWithEntities, optional) – Message attached with the gift.

TL Schema

inputInvoicePremiumGiftStars#dabab2ef
flags:#
user_id:InputUser
months:int
message:flags.0?TextWithEntities

= InputInvoice

Parameter Tree

InputInvoicePremiumGiftStars
├── user_idInputUser
│ ├── InputUserEmpty
│ ├── InputUserSelf
│ ├── InputUser
│ │ ├── user_idlong
│ │ └── access_hashlong
│ └── InputUserFromMessage
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── user_idlong
├── monthsint
└── messageTextWithEntities (optional)
├── textstring
└── entitiesVector < MessageEntity >
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ ├── lengthint
│ └── languagestring
│ ├── offsetint
│ ├── lengthint
│ └── urlstring
│ ├── offsetint
│ ├── lengthint
│ └── user_idlong
│ ├── offsetint
│ ├── lengthint
│ └── user_idInputUser
│ ├── InputUserEmpty
│ ├── InputUserSelf
│ ├── InputUser
│ └── InputUserFromMessage
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ ├── lengthint
│ └── document_idlong
│ ├── collapsedtrue (optional)
│ ├── offsetint
│ └── lengthint
├── relativetrue (optional)
├── short_timetrue (optional)
├── long_timetrue (optional)
├── short_datetrue (optional)
├── long_datetrue (optional)
├── day_of_weektrue (optional)
├── offsetint
├── lengthint
└── dateint

Example

InputInvoicePremiumGiftStars(
    user_id=await app.resolve_user(chat_id),
    months=0,
)