account.SetPrivacy

class pyrogram.raw.functions.account.SetPrivacy

Change privacy settings of current account

Details:
  • Layer: 223

  • ID: C9F81CE8

Parameters:
Returns:

account.PrivacyRules

TL Schema

account.setPrivacy#c9f81ce8
key:InputPrivacyKey
rules:Vector<InputPrivacyRule>

= account.PrivacyRules

Parameter Tree

SetPrivacy
├── keyInputPrivacyKey
│ ├── InputPrivacyKeyAbout
└── rulesVector < InputPrivacyRule >
│ └── usersVector < InputUser >
│ ├── InputUserEmpty
│ ├── InputUserSelf
│ ├── InputUser
│ │ ├── user_idlong
│ │ └── access_hashlong
│ └── InputUserFromMessage
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── user_idlong
│ └── usersVector < InputUser >
│ ├── InputUserEmpty
│ ├── InputUserSelf
│ ├── InputUser
│ │ ├── user_idlong
│ │ └── access_hashlong
│ └── InputUserFromMessage
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── user_idlong
│ └── chatsVector < long >
│ └── chatsVector < long >

Example

await app.invoke(
    SetPrivacy(
        key=InputPrivacyKeyStatusTimestamp(),
        rules=[
                InputPrivacyValueAllowContacts()
            ],
    )
)