Add raw attribute to Story class

This commit is contained in:
KurimuzonAkuma 2024-02-23 11:55:29 +03:00
parent 35f2867b28
commit 313dd665e7

View File

@ -123,6 +123,9 @@ class Story(Object, Update):
deleted (``bool``, *optional*): deleted (``bool``, *optional*):
The story is deleted. The story is deleted.
A story can be deleted in case it was deleted or you tried to retrieve a story that doesn't exist yet. A story can be deleted in case it was deleted or you tried to retrieve a story that doesn't exist yet.
raw (``pyrogram.raw.types.StoryItem``, *optional*):
The raw story object, as received from the Telegram API.
""" """
# TODO: Add Media Areas # TODO: Add Media Areas
@ -160,7 +163,8 @@ class Story(Object, Update):
disallowed_users: List[Union[int, str]] = None, disallowed_users: List[Union[int, str]] = None,
reactions: List["types.Reaction"] = None, reactions: List["types.Reaction"] = None,
skipped: bool = None, skipped: bool = None,
deleted: bool = None deleted: bool = None,
raw: "raw.types.StoryItem" = None
): ):
super().__init__(client) super().__init__(client)
@ -194,6 +198,7 @@ class Story(Object, Update):
self.reactions = reactions self.reactions = reactions
self.skipped = skipped self.skipped = skipped
self.deleted = deleted self.deleted = deleted
self.raw = raw
@staticmethod @staticmethod
async def _parse( async def _parse(
@ -340,6 +345,7 @@ class Story(Object, Update):
allowed_users=allowed_users, allowed_users=allowed_users,
disallowed_users=disallowed_users, disallowed_users=disallowed_users,
reactions=reactions, reactions=reactions,
raw=story,
client=client client=client
) )