This repository was archived by the owner on Dec 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathchat_event_action.py
More file actions
127 lines (89 loc) · 4.1 KB
/
chat_event_action.py
File metadata and controls
127 lines (89 loc) · 4.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-present Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Pyrogram is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
from enum import auto
from .auto_name import AutoName
class ChatEventAction(AutoName):
"""Chat event action enumeration used in :meth:`~pyrogram.Client.get_chat_event_log`."""
DESCRIPTION_CHANGED = auto()
"The chat description has been changed (see ``old_description`` and ``new_description``)"
HISTORY_TTL_CHANGED = auto()
"The history time-to-live has been changed (see ``old_history_ttl`` and ``new_history_ttl``)"
LINKED_CHAT_CHANGED = auto()
"The linked chat has been changed (see ``old_linked_chat`` and ``new_linked_chat``)"
# LOCATION_CHANGED = auto()
""
PHOTO_CHANGED = auto()
"The chat photo has been changed (see ``old_photo`` and ``new_photo``)"
# STICKER_SET_CHANGED = auto()
""
TITLE_CHANGED = auto()
"the chat title has been changed (see ``old_title`` and ``new_title``)"
USERNAME_CHANGED = auto()
"the chat username has been changed (see ``old_username`` and ``new_username``)"
CHAT_PERMISSIONS_CHANGED = auto()
"the default chat permissions has been changed (see ``old_chat_permissions`` and ``new_chat_permissions``)"
MESSAGE_DELETED = auto()
"a message has been deleted (see ``deleted_message``)"
# VOICE_CHAT_DISCARDED = auto()
""
MESSAGE_EDITED = auto()
"a message has been edited (see ``old_message`` and ``new_message``)"
INVITE_LINK_EDITED = auto()
"An invite link has been edited (see ``old_invite_link`` and ``new_invite`` link)"
INVITE_LINK_REVOKED = auto()
"An invite link has been revoked (see ``revoked_invite_link``)"
INVITE_LINK_DELETED = auto()
"An invite link has been deleted (see ``deleted_invite_link``)"
MEMBER_INVITED = auto()
"a member has been invited by someone (see ``invited_member``)"
MEMBER_JOINED = auto()
"a member joined by themselves. (see ``user``)"
# MEMBER_JOINED_BY_LINK = auto()
""
MEMBER_LEFT = auto()
"a member left by themselves. (see ``user``)"
# MEMBER_MUTED = auto()
""
ADMINISTRATOR_PRIVILEGES_CHANGED = auto()
"a chat member has been promoted/demoted or their administrator privileges has changed (see ``old_administrator_privileges`` and ``new_administrator_privileges``)"
MEMBER_PERMISSIONS_CHANGED = auto()
"a chat member has been restricted/unrestricted or banned/unbanned, or their permissions has changed (see ``old_member_permissions`` and ``new_member_permissions``)"
# MEMBER_UNMUTED = auto()
""
# MEMBER_VOLUME_CHANGED = auto()
""
# VIDEO_CHAT_STARTED = auto()
""
POLL_STOPPED = auto()
"a poll has been stopped (see ``stopped_poll``)"
# VOICE_CHAT_SETTINGS_CHANGED = auto()
""
INVITES_ENABLED = auto()
"the chat invitation has been enabled or disabled (see ``invites_enabled``)"
HISTORY_HIDDEN = auto()
"the chat history has been hidden or unhidden (see ``history_hidden``)"
SIGNATURES_ENABLED = auto()
"the message signatures have been enabled or disabled (see ``signatures_enabled``)"
SLOW_MODE_CHANGED = auto()
"the slow mode has been changes (see ``old_slow_mode`` and ``new_slow_mode``)"
MESSAGE_PINNED = auto()
"a message has been pinned (see ``pinned_message``)"
MESSAGE_UNPINNED = auto()
"a message has been unpinned (see ``unpinned_message``)"
UNKNOWN = auto()
"Unknown chat event action"