PrivacyRule

class pyrogram.types.PrivacyRule

A privacy rule.

Parameters:
  • allow_all (``bool``, *optional*) – Allow all users.

  • allow_chats (``bool``, *optional*) – Allow only participants of certain chats.

  • allow_contacts (``bool``, *optional*) – Allow contacts only

  • allow_premium (``bool``, *optional*) – Allow only users with a Premium subscription, currently only usable for CHAT_INVITE.

  • allow_users (``bool``, *optional*) – Allow only participants of certain users.

  • users (List of :obj:`~pyrogram.types.User`, *optional*) – List of users.

  • chats (List of :obj:`~pyrogram.types.Chat`, *optional*) – List of chats.