set_privacy()

async Client.set_privacy()

Set account privacy rules.

Usable by Users Bots
Parameters:
Returns:

List of PrivacyRule – On success, the list of privacy rules is returned.

Example

from pyrogram import enums, types

# Prevent everyone from seeing your phone number
await app.set_privacy(enums.PrivacyKey.PHONE_NUMBER, [types.InputPrivacyRuleDisallowAll()])