payments.ChangeStarsSubscription

class pyrogram.raw.functions.payments.ChangeStarsSubscription

Activate or deactivate a Telegram Star subscription ».

Details:
  • Layer: 227

  • ID: C7770878

Parameters:
  • peer (InputPeer) – Always pass inputPeerSelf.

  • subscription_id (str) – ID of the subscription.

  • canceled (bool, optional) – Whether to cancel or reactivate the subscription.

Returns:

bool

TL Schema

payments.changeStarsSubscription#c7770878
flags:#
peer:InputPeer
subscription_id:string
canceled:flags.0?Bool

= Bool

Parameter Tree

ChangeStarsSubscription
├── peer → InputPeer
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ │ └── chat_id → long
│ ├── InputPeerUser
│ │ ├── user_id → long
│ │ └── access_hash → long
│ ├── InputPeerChannel
│ │ ├── channel_id → long
│ │ └── access_hash → long
│ │ ├── peer → InputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── msg_id → int
│ │ └── user_id → long
│ ├── peer → InputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_id → int
│ └── channel_id → long
├── subscription_id → string
└── canceled → Bool (optional)

Example

await app.invoke(
    ChangeStarsSubscription(
        peer=await app.resolve_peer(chat_id),
        subscription_id="text",
        canceled=None,
    )
)