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: 227

  • 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_id → InputUser
│ ├── InputUserEmpty
│ ├── InputUserSelf
│ ├── InputUser
│ │ ├── user_id → long
│ │ └── access_hash → long
│ └── InputUserFromMessage
│ ├── peer → InputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_id → int
│ └── user_id → long
├── months → int
└── message → TextWithEntities (optional)
├── text → string
└── entities → Vector < MessageEntity >
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ ├── length → int
│ └── language → string
│ ├── offset → int
│ ├── length → int
│ └── url → string
│ ├── offset → int
│ ├── length → int
│ └── user_id → long
│ ├── offset → int
│ ├── length → int
│ └── user_id → InputUser
│ ├── InputUserEmpty
│ ├── InputUserSelf
│ ├── InputUser
│ └── InputUserFromMessage
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ ├── length → int
│ └── document_id → long
│ ├── collapsed → true (optional)
│ ├── offset → int
│ └── length → int
│ ├── relative → true (optional)
│ ├── short_time → true (optional)
│ ├── long_time → true (optional)
│ ├── short_date → true (optional)
│ ├── long_date → true (optional)
│ ├── day_of_week → true (optional)
│ ├── offset → int
│ ├── length → int
│ └── date → int
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ ├── length → int
│ └── old_text → string
├── offset → int
└── length → int

Example

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