StarsSubscription

class pyrogram.raw.types.StarsSubscription

Represents a Telegram Star subscription ».

Constructor of StarsSubscription.

Details:
  • Layer: 227

  • ID: 2E6EAB1A

Parameters:
  • id (str) – Subscription ID.

  • peer (Peer) – Identifier of the associated private chat.

  • until_date (int 32-bit) – Expiration date of the current subscription period.

  • pricing (StarsSubscriptionPricing) – Pricing of the subscription in Telegram Stars.

  • canceled (bool, optional) – Whether this subscription was cancelled.

  • can_refulfill (bool, optional) – Whether we left the associated private channel, but we can still rejoin it using payments.fulfillStarsSubscription because the current subscription period hasn’t expired yet.

  • missing_balance (bool, optional) – Whether this subscription has expired because there are not enough stars on the user’s balance to extend it.

  • bot_canceled (bool, optional) – Set if this bot subscription was cancelled by the bot

  • chat_invite_hash (str, optional) – Invitation link, used to renew the subscription after cancellation or expiration.

  • title (str, optional) – For bot subscriptions, the title of the subscription invoice

  • photo (WebDocument, optional) – For bot subscriptions, the photo from the subscription invoice

  • invoice_slug (str, optional) – For bot subscriptions, the identifier of the subscription invoice

TL Schema

starsSubscription#2e6eab1a
flags:#
canceled:flags.0?true
can_refulfill:flags.1?true
missing_balance:flags.2?true
bot_canceled:flags.7?true
id:string
peer:Peer
until_date:int
pricing:StarsSubscriptionPricing
chat_invite_hash:flags.3?string
title:flags.4?string
photo:flags.5?WebDocument
invoice_slug:flags.6?string

= StarsSubscription

Parameter Tree

StarsSubscription
├── canceled → true (optional)
├── can_refulfill → true (optional)
├── missing_balance → true (optional)
├── bot_canceled → true (optional)
├── id → string
├── peer → Peer
│ ├── PeerUser
│ │ └── user_id → long
│ ├── PeerChat
│ │ └── chat_id → long
│ └── PeerChannel
│ └── channel_id → long
├── until_date → int
├── pricing → StarsSubscriptionPricing
│ ├── period → int
│ └── amount → long
├── chat_invite_hash → string (optional)
├── title → string (optional)
├── photo → WebDocument (optional)
│ ├── WebDocument
│ │ ├── url → string
│ │ ├── access_hash → long
│ │ ├── size → int
│ │ ├── mime_type → string
│ │ └── attributes → Vector < DocumentAttribute >
│ │ ├── DocumentAttributeImageSize
│ │ │ ├── w → int
│ │ │ └── h → int
│ │ ├── DocumentAttributeAnimated
│ │ ├── DocumentAttributeSticker
│ │ │ ├── mask → true (optional)
│ │ │ ├── alt → string
│ │ │ ├── stickerset → InputStickerSet
│ │ │ │ ├── InputStickerSetEmpty
│ │ │ │ ├── InputStickerSetID
│ │ │ │ ├── InputStickerSetShortName
│ │ │ │ ├── InputStickerSetAnimatedEmoji
│ │ │ │ ├── InputStickerSetDice
│ │ │ │ ├── InputStickerSetAnimatedEmojiAnimations
│ │ │ │ ├── InputStickerSetPremiumGifts
│ │ │ │ ├── InputStickerSetEmojiGenericAnimations
│ │ │ │ ├── InputStickerSetEmojiDefaultStatuses
│ │ │ │ ├── InputStickerSetEmojiDefaultTopicIcons
│ │ │ │ └── InputStickerSetTonGifts
│ │ │ └── mask_coords → MaskCoords (optional)
│ │ │ └── MaskCoords
│ │ ├── DocumentAttributeVideo
│ │ │ ├── round_message → true (optional)
│ │ │ ├── supports_streaming → true (optional)
│ │ │ ├── nosound → true (optional)
│ │ │ ├── duration → double
│ │ │ ├── w → int
│ │ │ ├── h → int
│ │ │ ├── preload_prefix_size → int (optional)
│ │ │ ├── video_start_ts → double (optional)
│ │ │ └── video_codec → string (optional)
│ │ ├── DocumentAttributeAudio
│ │ │ ├── voice → true (optional)
│ │ │ ├── duration → int
│ │ │ ├── title → string (optional)
│ │ │ ├── performer → string (optional)
│ │ │ └── waveform → bytes (optional)
│ │ ├── DocumentAttributeFilename
│ │ │ └── file_name → string
│ │ ├── free → true (optional)
│ │ ├── text_color → true (optional)
│ │ ├── alt → string
│ │ └── stickerset → InputStickerSet
│ │ ├── InputStickerSetEmpty
│ │ ├── InputStickerSetID
│ │ ├── InputStickerSetShortName
│ │ ├── InputStickerSetDice
│ │ ├── InputStickerSetPremiumGifts
│ │ └── InputStickerSetTonGifts
│ └── WebDocumentNoProxy
│ ├── url → string
│ ├── size → int
│ ├── mime_type → string
│ └── attributes → Vector < DocumentAttribute >
│ │ ├── w → int
│ │ └── h → int
│ │ ├── mask → true (optional)
│ │ ├── alt → string
│ │ ├── stickerset → InputStickerSet
│ │ │ ├── InputStickerSetEmpty
│ │ │ ├── InputStickerSetID
│ │ │ ├── InputStickerSetShortName
│ │ │ ├── InputStickerSetAnimatedEmoji
│ │ │ ├── InputStickerSetDice
│ │ │ ├── InputStickerSetPremiumGifts
│ │ │ └── InputStickerSetTonGifts
│ │ └── mask_coords → MaskCoords (optional)
│ │ └── MaskCoords
│ │ ├── round_message → true (optional)
│ │ ├── supports_streaming → true (optional)
│ │ ├── nosound → true (optional)
│ │ ├── duration → double
│ │ ├── w → int
│ │ ├── h → int
│ │ ├── preload_prefix_size → int (optional)
│ │ ├── video_start_ts → double (optional)
│ │ └── video_codec → string (optional)
│ │ ├── voice → true (optional)
│ │ ├── duration → int
│ │ ├── title → string (optional)
│ │ ├── performer → string (optional)
│ │ └── waveform → bytes (optional)
│ │ └── file_name → string
│ ├── free → true (optional)
│ ├── text_color → true (optional)
│ ├── alt → string
│ └── stickerset → InputStickerSet
│ ├── InputStickerSetEmpty
│ ├── InputStickerSetID
│ ├── InputStickerSetDice
└── invoice_slug → string (optional)

Example

StarsSubscription(
    id="text",
    peer=PeerUser(user_id=0),
    until_date=0,
    pricing=StarsSubscriptionPricing(
        period=0,
        amount=0
    ),
)