mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-30 17:43:32 +00:00
Stories fields in User
and Chat
object
This commit is contained in:
parent
a7539997de
commit
e8ee3810d5
@ -61,6 +61,12 @@ class Chat(Object):
|
||||
is_support (``bool``):
|
||||
True, if this chat is part of the Telegram support team. Users and bots only.
|
||||
|
||||
is_stories_hidden (``bool``):
|
||||
True, if this chat has hidden stories.
|
||||
|
||||
is_stories_unavailable (``bool``):
|
||||
True, if this chat stories is unavailable.
|
||||
|
||||
title (``str``, *optional*):
|
||||
Title, for supergroups, channels and basic group chats.
|
||||
|
||||
@ -157,6 +163,8 @@ class Chat(Object):
|
||||
is_scam: bool = None,
|
||||
is_fake: bool = None,
|
||||
is_support: bool = None,
|
||||
is_stories_hidden: bool = None,
|
||||
is_stories_unavailable: bool = None,
|
||||
title: str = None,
|
||||
username: str = None,
|
||||
usernames: List["types.Username"] = None,
|
||||
@ -191,6 +199,8 @@ class Chat(Object):
|
||||
self.is_scam = is_scam
|
||||
self.is_fake = is_fake
|
||||
self.is_support = is_support
|
||||
self.is_stories_hidden = is_stories_hidden
|
||||
self.is_stories_unavailable = is_stories_unavailable
|
||||
self.title = title
|
||||
self.username = username
|
||||
self.usernames = usernames
|
||||
@ -269,6 +279,8 @@ class Chat(Object):
|
||||
is_creator=getattr(channel, "creator", None),
|
||||
is_scam=getattr(channel, "scam", None),
|
||||
is_fake=getattr(channel, "fake", None),
|
||||
is_stories_hidden=getattr(channel, "stories_hidden", None),
|
||||
is_stories_unavailable=getattr(channel, "stories_unavailable", None),
|
||||
title=channel.title,
|
||||
username=getattr(channel, "username", None),
|
||||
usernames=types.List([types.Username._parse(r) for r in usernames]) or None,
|
||||
|
@ -100,6 +100,15 @@ class User(Object, Update):
|
||||
is_premium (``bool``, *optional*):
|
||||
True, if this user is a premium user.
|
||||
|
||||
is_close_friend (``bool``):
|
||||
True, if this user is a close friend.
|
||||
|
||||
is_stories_hidden (``bool``):
|
||||
True, if this user has hidden stories.
|
||||
|
||||
is_stories_unavailable (``bool``):
|
||||
True, if this chat stories is unavailable.
|
||||
|
||||
first_name (``str``, *optional*):
|
||||
User's or bot's first name.
|
||||
|
||||
@ -169,6 +178,9 @@ class User(Object, Update):
|
||||
is_fake: bool = None,
|
||||
is_support: bool = None,
|
||||
is_premium: bool = None,
|
||||
is_close_friend: bool = None,
|
||||
is_stories_hidden: bool = None,
|
||||
is_stories_unavailable: bool = None,
|
||||
first_name: str = None,
|
||||
last_name: str = None,
|
||||
status: "enums.UserStatus" = None,
|
||||
@ -197,6 +209,9 @@ class User(Object, Update):
|
||||
self.is_fake = is_fake
|
||||
self.is_support = is_support
|
||||
self.is_premium = is_premium
|
||||
self.is_close_friend = is_close_friend
|
||||
self.is_stories_hidden = is_stories_hidden
|
||||
self.is_stories_unavailable = is_stories_unavailable
|
||||
self.first_name = first_name
|
||||
self.last_name = last_name
|
||||
self.status = status
|
||||
@ -241,6 +256,9 @@ class User(Object, Update):
|
||||
is_fake=user.fake,
|
||||
is_support=user.support,
|
||||
is_premium=user.premium,
|
||||
is_close_friend=user.close_friend,
|
||||
is_stories_hidden=user.stories_hidden,
|
||||
is_stories_unavailable=user.stories_unavailable,
|
||||
first_name=user.first_name,
|
||||
last_name=user.last_name,
|
||||
**User._parse_status(user.status, user.bot),
|
||||
|
Loading…
Reference in New Issue
Block a user