account.SetPrivacy

class pyrogram.raw.functions.account.SetPrivacy

Change privacy settings of current account

Details:
  • Layer: 227

  • ID: C9F81CE8

Parameters:
Returns:

account.PrivacyRules

TL Schema

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

= account.PrivacyRules

Parameter Tree

SetPrivacy
├── key → InputPrivacyKey
│ ├── InputPrivacyKeyAbout
└── rules → Vector < InputPrivacyRule >
│ └── users → Vector < InputUser >
│ ├── InputUserEmpty
│ ├── InputUserSelf
│ ├── InputUser
│ │ ├── user_id → long
│ │ └── access_hash → long
│ └── InputUserFromMessage
│ ├── peer → InputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_id → int
│ └── user_id → long
│ └── users → Vector < InputUser >
│ ├── InputUserEmpty
│ ├── InputUserSelf
│ ├── InputUser
│ │ ├── user_id → long
│ │ └── access_hash → long
│ └── InputUserFromMessage
│ ├── peer → InputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_id → int
│ └── user_id → long
│ └── chats → Vector < long >
│ └── chats → Vector < long >

Example

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