ChatEvent¶
- class pyrogram.types.ChatEvent¶
A chat event from the recent actions log (also known as admin log).
See
actionto know which kind of event this is and the relative attributes to get the event content.- Parameters:¶
id (``int``) – Chat event identifier.
date (:py:obj:`~datetime.datetime`) – Date of the event.
action (:obj:`~pyrogram.enums.ChatEventAction`) – Event action.
user (:obj:`~pyrogram.types.User`) – User that triggered the event.
old_description, new_description (``str``, *optional*) – Previous and new chat description. For
DESCRIPTION_CHANGEDaction only.old_history_ttl, new_history_ttl (``int``, *optional*) – Previous and new chat history TTL. For
HISTORY_TTL_CHANGEDaction only.old_linked_chat, new_linked_chat (:obj:`~pyrogram.types.Chat`, *optional*) – Previous and new linked chat. For
LINKED_CHAT_CHANGEDaction only.old_photo, new_photo (:obj:`~pyrogram.types.Photo`, *optional*) – Previous and new chat photo. For
PHOTO_CHANGEDaction only.old_title, new_title (``str``, *optional*) – Previous and new chat title. For
TITLE_CHANGEDaction only.old_username, new_username (``str``, *optional*) – Previous and new chat username. For
USERNAME_CHANGEDaction only.old_usernames, new_usernames (List of :obj:`~pyrogram.types.Username`, *optional*) – Previous and new chat usernames. For
USERNAMES_CHANGEDaction only.old_chat_permissions, new_chat_permissions (:obj:`~pyrogram.types.ChatPermissions`, *optional*) – Previous and new default chat permissions. For
CHAT_PERMISSIONS_CHANGEDaction only.deleted_message (:obj:`~pyrogram.types.Message`, *optional*) – Deleted message. For
MESSAGE_DELETEDaction only.old_message, new_message (:obj:`~pyrogram.types.Message`, *optional*) – Previous and new message before it has been edited. For
MESSAGE_EDITEDaction only.invited_member (:obj:`~pyrogram.types.ChatMember`, *optional*) – New invited chat member. For
MEMBER_INVITEDaction only.invite_link (:obj:`~pyrogram.types.ChatInviteLink`, *optional*) – Invite link used to join the chat. For
MEMBER_JOINED_BY_LINKandMEMBER_JOINED_BY_REQUESTactions 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_LINKaction only.approver_user (:obj:`~pyrogram.types.User`, *optional*) – User identifier of the chat administrator who approved the user join request For
MEMBER_JOINED_BY_REQUESTaction only.old_administrator_privileges, new_administrator_privileges (:obj:`~pyrogram.types.ChatMember`, *optional*) – Previous and new administrator privileges. For
ADMINISTRATOR_PRIVILEGES_CHANGEDaction only.old_member_permissions, new_member_permissions (:obj:`~pyrogram.types.ChatMember`, *optional*) – Previous and new member permissions. For
MEMBER_PERMISSIONS_CHANGEDaction only.stopped_poll (:obj:`~pyrogram.types.Message`, *optional*) – Message containing the stopped poll. For
POLL_STOPPEDaction only.invites_enabled (``bool``, *optional*) – If chat invites were enabled (True) or disabled (False). For
INVITES_ENABLEDaction only.history_hidden (``bool``, *optional*) – If chat history has been hidden (True) or unhidden (False). For
HISTORY_HIDDENaction only.signatures_enabled (``bool``, *optional*) – If message signatures were enabled (True) or disabled (False). For
SIGNATURES_ENABLEDaction only.old_slow_mode, new_slow_mode (``int``, *optional*) – Previous and new slow mode value in seconds. For
SLOW_MODE_CHANGEDaction only.pinned_message (:obj:`~pyrogram.types.Message`, *optional*) – Pinned message. For
MESSAGE_PINNEDaction only.unpinned_message (:obj:`~pyrogram.types.Message`, *optional*) – Unpinned message. For
MESSAGE_UNPINNEDaction only.old_invite_link, new_invite_link (:obj:`~pyrogram.types.ChatInviteLink`, *optional*) – Previous and new edited invite link. For
INVITE_LINK_EDITEDaction only.revoked_invite_link (:obj:`~pyrogram.types.ChatInviteLink`, *optional*) – Revoked invite link. For
INVITE_LINK_REVOKEDaction only.deleted_invite_link (:obj:`~pyrogram.types.ChatInviteLink`, *optional*) – Deleted invite link. For
INVITE_LINK_DELETEDaction only.old_chat_member, new_chat_member (:obj:`~pyrogram.types.ChatMember`, *optional*) – Affected chat member status of the user. For
MEMBER_SUBSCRIPTION_EXTENDEDaction only.show_message_sender_enabled (``bool``, *optional*) – The show_message_sender setting of a channel was toggled. For
SHOW_MESSAGE_SENDER_ENABLEDaction only.has_aggressive_anti_spam_enabled (``bool``, *optional*) – The
has_aggressive_anti_spam_enabledsetting of a supergroup was toggled. ForAGGRESSIVE_ANTI_SPAM_TOGGLEDaction only.has_protected_content (``bool``, *optional*) – The
has_protected_contentsetting of a channel was toggled. ForPROTECTED_CONTENT_TOGGLEDaction only.is_forum (``bool``, *optional*) – The
is_forumsetting of a channel was toggled. ForCHAT_IS_FORUM_TOGGLEDaction only.old_topic_info, new_topic_info (:obj:`~pyrogram.types.ForumTopic`, *optional*) – Affected forum topic info of the chat.
old_member_tag, new_member_tag (``str``, *optional*) – Affected tag of the chat member.