mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-27 08:36:27 +00:00
Add deleted parameter to ForumTopic class
This commit is contained in:
parent
3ea48899f4
commit
30d3b97d20
@ -69,6 +69,9 @@ class ForumTopic(Object):
|
||||
|
||||
is_hidden (``bool``, *optional*):
|
||||
True, if the topic is hidden.
|
||||
|
||||
deleted (``bool``, *optional*):
|
||||
The forum topic is deleted.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
@ -88,7 +91,8 @@ class ForumTopic(Object):
|
||||
is_closed: bool = None,
|
||||
is_pinned: bool = None,
|
||||
is_short: bool = None,
|
||||
is_hidden: bool = None
|
||||
is_hidden: bool = None,
|
||||
deleted: bool = None
|
||||
):
|
||||
super().__init__()
|
||||
|
||||
@ -107,9 +111,13 @@ class ForumTopic(Object):
|
||||
self.is_pinned = is_pinned
|
||||
self.is_short = is_short
|
||||
self.is_hidden = is_hidden
|
||||
self.deleted = deleted
|
||||
|
||||
@staticmethod
|
||||
def _parse(client: "pyrogram.Client", forum_topic: "raw.types.ForumTopic", messages: dict = {}, users: dict = {}, chats: dict = {}) -> "ForumTopic":
|
||||
if isinstance(forum_topic, raw.types.ForumTopicDeleted):
|
||||
return ForumTopic(id=forum_topic.id, deleted=True)
|
||||
|
||||
creator = None
|
||||
|
||||
peer = getattr(forum_topic, "from_id", None)
|
||||
|
Loading…
Reference in New Issue
Block a user