StarsSubscription

class pyrogram.raw.types.StarsSubscription

Represents a Telegram Star subscription ».

Constructor of StarsSubscription.

Details:
  • Layer: 223

  • 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
├── canceledtrue (optional)
├── can_refulfilltrue (optional)
├── missing_balancetrue (optional)
├── bot_canceledtrue (optional)
├── idstring
├── peerPeer
│ ├── PeerUser
│ │ └── user_idlong
│ ├── PeerChat
│ │ └── chat_idlong
│ └── PeerChannel
│ └── channel_idlong
├── until_dateint
├── pricingStarsSubscriptionPricing
│ ├── periodint
│ └── amountlong
├── chat_invite_hashstring (optional)
├── titlestring (optional)
├── photoWebDocument (optional)
│ ├── WebDocument
│ │ ├── urlstring
│ │ ├── access_hashlong
│ │ ├── sizeint
│ │ ├── mime_typestring
│ │ └── attributesVector < DocumentAttribute >
│ │ ├── DocumentAttributeImageSize
│ │ │ ├── wint
│ │ │ └── hint
│ │ ├── DocumentAttributeAnimated
│ │ ├── DocumentAttributeSticker
│ │ │ ├── masktrue (optional)
│ │ │ ├── altstring
│ │ │ ├── stickersetInputStickerSet
│ │ │ │ ├── InputStickerSetEmpty
│ │ │ │ ├── InputStickerSetID
│ │ │ │ ├── InputStickerSetShortName
│ │ │ │ ├── InputStickerSetAnimatedEmoji
│ │ │ │ ├── InputStickerSetDice
│ │ │ │ ├── InputStickerSetAnimatedEmojiAnimations
│ │ │ │ ├── InputStickerSetPremiumGifts
│ │ │ │ ├── InputStickerSetEmojiGenericAnimations
│ │ │ │ ├── InputStickerSetEmojiDefaultStatuses
│ │ │ │ ├── InputStickerSetEmojiDefaultTopicIcons
│ │ │ │ └── InputStickerSetTonGifts
│ │ │ └── mask_coordsMaskCoords (optional)
│ │ │ └── MaskCoords
│ │ ├── DocumentAttributeVideo
│ │ │ ├── round_messagetrue (optional)
│ │ │ ├── supports_streamingtrue (optional)
│ │ │ ├── nosoundtrue (optional)
│ │ │ ├── durationdouble
│ │ │ ├── wint
│ │ │ ├── hint
│ │ │ ├── preload_prefix_sizeint (optional)
│ │ │ ├── video_start_tsdouble (optional)
│ │ │ └── video_codecstring (optional)
│ │ ├── DocumentAttributeAudio
│ │ │ ├── voicetrue (optional)
│ │ │ ├── durationint
│ │ │ ├── titlestring (optional)
│ │ │ ├── performerstring (optional)
│ │ │ └── waveformbytes (optional)
│ │ ├── DocumentAttributeFilename
│ │ │ └── file_namestring
│ │ ├── freetrue (optional)
│ │ ├── text_colortrue (optional)
│ │ ├── altstring
│ │ └── stickersetInputStickerSet
│ │ ├── InputStickerSetEmpty
│ │ ├── InputStickerSetID
│ │ ├── InputStickerSetShortName
│ │ ├── InputStickerSetDice
│ │ ├── InputStickerSetPremiumGifts
│ │ └── InputStickerSetTonGifts
│ └── WebDocumentNoProxy
│ ├── urlstring
│ ├── sizeint
│ ├── mime_typestring
│ └── attributesVector < DocumentAttribute >
│ │ ├── wint
│ │ └── hint
│ │ ├── masktrue (optional)
│ │ ├── altstring
│ │ ├── stickersetInputStickerSet
│ │ │ ├── InputStickerSetEmpty
│ │ │ ├── InputStickerSetID
│ │ │ ├── InputStickerSetShortName
│ │ │ ├── InputStickerSetAnimatedEmoji
│ │ │ ├── InputStickerSetDice
│ │ │ ├── InputStickerSetPremiumGifts
│ │ │ └── InputStickerSetTonGifts
│ │ └── mask_coordsMaskCoords (optional)
│ │ └── MaskCoords
│ │ ├── round_messagetrue (optional)
│ │ ├── supports_streamingtrue (optional)
│ │ ├── nosoundtrue (optional)
│ │ ├── durationdouble
│ │ ├── wint
│ │ ├── hint
│ │ ├── preload_prefix_sizeint (optional)
│ │ ├── video_start_tsdouble (optional)
│ │ └── video_codecstring (optional)
│ │ ├── voicetrue (optional)
│ │ ├── durationint
│ │ ├── titlestring (optional)
│ │ ├── performerstring (optional)
│ │ └── waveformbytes (optional)
│ │ └── file_namestring
│ ├── freetrue (optional)
│ ├── text_colortrue (optional)
│ ├── altstring
│ └── stickersetInputStickerSet
│ ├── InputStickerSetEmpty
│ ├── InputStickerSetID
│ ├── InputStickerSetDice
└── invoice_slugstring (optional)

Example

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