pyrofork/pyrogram/enums/chat_event_action.py
wulan17 ea33dc43a4
Pyrofork: Add Forum Topic Support
Signed-off-by: wulan17 <wulan17@nusantararom.org>

Pyrofork: Add ForumTopicCreated, ForumTopicClosed, ForumTopicReopened, ForumTopicEdited service message types

Signed-off-by: wulan17 <wulan17@nusantararom.org>

Pyrofork: Add can_manage_topics fields to ChatPrivileges and ChatPermissions class

Signed-off-by: wulan17 <wulan17@nusantararom.org>

Pyrofork: Add manage_topics parameter to promote_chat_member, restrict_chat_member, and set_chat_permissions methods

Signed-off-by: wulan17 <wulan17@nusantararom.org>

Pyrofork: Add message_thread_id parameter to send_{animation,audio,cached_media,contact,dice,document,location,media_group,message,photo,poll,sticker,venue,video,video_note,voice} methods

Signed-off-by: wulan17 <wulan17@nusantararom.org>

Pyrogram: Add message_thread_id parameter to forward_message() method and forward() bound method

Signed-off-by: wulan17 <wulan17@nusantararom.org>

Pyrofork: Add message_thread_id parameter to send_game() method and copy() bound method

Signed-off-by: wulan17 <wulan17@nusantararom.org>

Pyrogram: Add ForumTopic and some cleanup

Signed-off-by: wulan17 <wulan17@nusantararom.org>

Pyrofork: Add {create,close,reopen,edit,delete}_forum_topic methods

Signed-off-by: wulan17 <wulan17@nusantararom.org>

Pyrofork: Add message_thread_id parameter to copy_message method

Signed-off-by: wulan17 <wulan17@nusantararom.org>

Pyrofork: Add {CREATED,EDITED,DELETED}_FORUM_TOPIC ChatEvent

Signed-off-by: wulan17 <wulan17@nusantararom.org>

Pyrofork: utils: Check if messages has topics atribut

Signed-off-by: wulan17 <wulan17@nusantararom.org>

Pyrogram: types: Message: Add error handling and is_topic_message

Signed-off-by: wulan17 <wulan17@nusantararom.org>

Pyrofork: Add message_thread_id parameter to send_inline_bot_result()

Signed-off-by: wulan17 <wulan17@nusantararom.org>

Pyrofork: add GeneralTopicHidden and GeneralTopicUnhidden service messages types

Signed-off-by: wulan17 <wulan17@nusantararom.org>

Pyrofork: add message_thread_id parameter to send_chat_action

Signed-off-by: wulan17 <wulan17@nusantararom.org>

PyroFork: Add CloseGeneralTopic, EditGeneralTopic, ReopenGeneralTopic, HideGeneralTopic. UnhideGeneralTopic, and some cleanup

Signed-off-by: wulan17 <wulan17@nusantararom.org>

PyroFork: Add get_forum_topic and get_forum_topic_by_id methods

Signed-off-by: wulan17 <galihgustip@gmail.com>

Pyrofork: Update some methods to layer 160

Signed-off-by: wulan17 <wulan17@nusantararom.org>

pyrofork: Add InputReplyToMessage

Signed-off-by: wulan17 <wulan17@nusantararom.org>

PyroFork: docs: Add missing PeerUser and PeerChannel

and some cleanup

Signed-off-by: wulan17 <galihgustip@gmail.com>
2023-08-18 03:30:36 +07:00

137 lines
4.5 KiB
Python

# Pyrofork - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-present Dan <https://github.com/delivrance>
# Copyright (C) 2022-present Mayuri-Chan <https://github.com/Mayuri-Chan>
#
# This file is part of Pyrofork.
#
# Pyrofork 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.
#
# Pyrofork 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 Pyrofork. 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``)"
CREATED_FORUM_TOPIC = auto()
"a new forum topic has been created (see `created_forum_topic`)"
EDITED_FORUM_TOPIC = auto()
"a forum topic has been edited (see `old_forum_topic` and `new_forum_topic`)"
DELETED_FORUM_TOPIC = auto()
"a forum topic has been deleted (see `deleted_forum_topic`)"
UNKNOWN = auto()
"Unknown chat event action"