account.ToggleNoPaidMessagesException

class pyrogram.raw.functions.account.ToggleNoPaidMessagesException

Allow a user to send us messages without paying if paid messages » are enabled.

Details:
  • Layer: 223

  • ID: FE2EDA76

Parameters:
  • user_id (InputUser) – The user to exempt or unexempt.

  • refund_charged (bool, optional) – If set and require_payment is not set, refunds the amounts the user has already paid us to send us messages (directly or via a monoforum).

  • require_payment (bool, optional) – If set, requires the user to pay in order to send us messages. Can only be set by monoforums, not users, i.e. parent_peer must be set if this flag is set; users must instead use the inputPrivacyKeyNoPaidMessages privacy setting to remove a previously added exemption. If not set, allows the user to send us messages without paying (can be unset by both monoforums and users).

  • parent_peer (InputPeer, optional) – If set, applies the setting within the monoforum aka direct messages » (pass the ID of the monoforum, not the ID of the associated channel).

Returns:

bool

TL Schema

account.toggleNoPaidMessagesException#fe2eda76
flags:#
refund_charged:flags.0?true
require_payment:flags.2?true
parent_peer:flags.1?InputPeer
user_id:InputUser

= Bool

Parameter Tree

ToggleNoPaidMessagesException
├── refund_chargedtrue (optional)
├── require_paymenttrue (optional)
├── parent_peerInputPeer (optional)
│ ├── 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
└── user_idInputUser
├── InputUserEmpty
├── InputUserSelf
├── InputUser
│ ├── user_idlong
│ └── access_hashlong
├── peerInputPeer
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ ├── InputPeerUser
│ ├── InputPeerChannel
├── msg_idint
└── user_idlong

Example

await app.invoke(
    ToggleNoPaidMessagesException(
        refund_charged=None,
        require_payment=None,
        parent_peer=await app.resolve_peer(chat_id),
        user_id=await app.resolve_user(chat_id),
    )
)