ChatEvent

class pyrogram.types.ChatEvent

A chat event from the recent actions log (also known as admin log).

See action to know which kind of event this is and the relative attributes to get the event content.

Parameters:
  • id (int) – Chat event identifier.

  • date (datetime) – Date of the event.

  • action (ChatEventAction) – Event action.

  • user (User) – User that triggered the event.

  • old_description, new_description (str, optional) – Previous and new chat description. For DESCRIPTION_CHANGED action only.

  • old_history_ttl, new_history_ttl (int, optional) – Previous and new chat history TTL. For HISTORY_TTL_CHANGED action only.

  • old_linked_chat, new_linked_chat (Chat, optional) – Previous and new linked chat. For LINKED_CHAT_CHANGED action only.

  • old_photo, new_photo (Photo, optional) – Previous and new chat photo. For PHOTO_CHANGED action only.

  • old_title, new_title (str, optional) – Previous and new chat title. For TITLE_CHANGED action only.

  • old_username, new_username (str, optional) – Previous and new chat username. For USERNAME_CHANGED action only.

  • old_usernames, new_usernames (List of Username, optional) – Previous and new chat usernames. For USERNAMES_CHANGED action only.

  • old_chat_permissions, new_chat_permissions (ChatPermissions, optional) – Previous and new default chat permissions. For CHAT_PERMISSIONS_CHANGED action only.

  • deleted_message (Message, optional) – Deleted message. For MESSAGE_DELETED action only.

  • old_message, new_message (Message, optional) – Previous and new message before it has been edited. For MESSAGE_EDITED action only.

  • invited_member (ChatMember, optional) – New invited chat member. For MEMBER_INVITED action only.

  • invite_link (ChatInviteLink, optional) – Invite link used to join the chat. For MEMBER_JOINED_BY_LINK and MEMBER_JOINED_BY_REQUEST actions only.

  • via_chat_folder_invite_link (bool, optional) – True, if the user has joined the chat using an invite link for a chat folder. For MEMBER_JOINED_BY_LINK action only.

  • approver_user (User, optional) – User identifier of the chat administrator who approved the user join request For MEMBER_JOINED_BY_REQUEST action only.

  • old_administrator_privileges, new_administrator_privileges (ChatMember, optional) – Previous and new administrator privileges. For ADMINISTRATOR_PRIVILEGES_CHANGED action only.

  • old_member_permissions, new_member_permissions (ChatMember, optional) – Previous and new member permissions. For MEMBER_PERMISSIONS_CHANGED action only.

  • stopped_poll (Message, optional) – Message containing the stopped poll. For POLL_STOPPED action only.

  • invites_enabled (bool, optional) – If chat invites were enabled (True) or disabled (False). For INVITES_ENABLED action only.

  • history_hidden (bool, optional) – If chat history has been hidden (True) or unhidden (False). For HISTORY_HIDDEN action only.

  • signatures_enabled (bool, optional) – If message signatures were enabled (True) or disabled (False). For SIGNATURES_ENABLED action only.

  • old_slow_mode, new_slow_mode (int, optional) – Previous and new slow mode value in seconds. For SLOW_MODE_CHANGED action only.

  • pinned_message (Message, optional) – Pinned message. For MESSAGE_PINNED action only.

  • unpinned_message (Message, optional) – Unpinned message. For MESSAGE_UNPINNED action only.

  • old_invite_link, new_invite_link (ChatInviteLink, optional) – Previous and new edited invite link. For INVITE_LINK_EDITED action only.

  • revoked_invite_link (ChatInviteLink, optional) – Revoked invite link. For INVITE_LINK_REVOKED action only.

  • deleted_invite_link (ChatInviteLink, optional) – Deleted invite link. For INVITE_LINK_DELETED action only.

  • created_forum_topic (ForumTopic, optional) – New forum topic. For CREATED_FORUM_TOPIC action only.

  • old_forum_topic, new_forum_topic (ForumTopic, optional) – Edited forum topic. For EDITED_FORUM_TOPIC action only.

  • deleted_forum_topic (ForumTopic, optional) – Deleted forum topic. For DELETED_FORUM_TOPIC action only.

  • old_chat_member, new_chat_member (ChatMember, optional) – Affected chat member status of the user. For MEMBER_SUBSCRIPTION_EXTENDED action only.

  • show_message_sender_enabled (bool, optional) – The show_message_sender setting of a channel was toggled. For SHOW_MESSAGE_SENDER_ENABLED action only.

  • has_aggressive_anti_spam_enabled (bool, optional) – The has_aggressive_anti_spam_enabled setting of a supergroup was toggled. For AGGRESSIVE_ANTI_SPAM_TOGGLED action only.

  • has_protected_content (bool, optional) – The has_protected_content setting of a channel was toggled. For PROTECTED_CONTENT_TOGGLED action only.

  • is_forum (bool, optional) – The is_forum setting of a channel was toggled. For CHAT_IS_FORUM_TOGGLED action only.