payments.ChangeStarsSubscription

class pyrogram.raw.functions.payments.ChangeStarsSubscription

Activate or deactivate a Telegram Star subscription ».

Details:
  • Layer: 223

  • 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
├── peerInputPeer
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ │ └── chat_idlong
│ ├── InputPeerUser
│ │ ├── user_idlong
│ │ └── access_hashlong
│ ├── InputPeerChannel
│ │ ├── channel_idlong
│ │ └── access_hashlong
│ │ ├── peerInputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── msg_idint
│ │ └── user_idlong
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── channel_idlong
├── subscription_idstring
└── canceledBool (optional)

Example

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