PrivacyRule#

class pyrogram.raw.base.PrivacyRule#

Privacy rules together with privacy keys indicate what can or can’t someone do and are specified by a PrivacyRule constructor, and its input counterpart InputPrivacyRule. See the privacy documentation for more info.

Telegram allows users to specify granular privacy settings, choosing which users can or can’t interact with them in certain ways. Privacy rules together with privacy keys indicate what can or can’t someone do and are specified by a PrivacyRule constructor, and its input counterpart InputPrivacyRule. See the privacy documentation for more info.

Constructors:

This base type has 12 constructors available.

PrivacyValueAllowAll

Allow all users

PrivacyValueAllowBots

Allow bots and mini apps

PrivacyValueAllowChatParticipants

Allow all participants of certain chats

PrivacyValueAllowCloseFriends

Allow only close friends

PrivacyValueAllowContacts

Allow all contacts

PrivacyValueAllowPremium

Allow only users with a Premium subscription , currently only usable for inputPrivacyKeyChatInvite.

PrivacyValueAllowUsers

Allow only certain users

PrivacyValueDisallowAll

Disallow all users

PrivacyValueDisallowBots

Disallow bots and mini apps

PrivacyValueDisallowChatParticipants

Disallow only participants of certain chats

PrivacyValueDisallowContacts

Disallow only contacts

PrivacyValueDisallowUsers

Disallow only certain users