mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 21:07:59 +00:00
Add Chat.is_fake and User.is_fake
This commit is contained in:
parent
1bba5cad54
commit
57128c0ab7
@ -46,7 +46,10 @@ class Chat(Object):
|
|||||||
True, if this chat owner is the current user. Supergroups, channels and groups only.
|
True, if this chat owner is the current user. Supergroups, channels and groups only.
|
||||||
|
|
||||||
is_scam (``bool``, *optional*):
|
is_scam (``bool``, *optional*):
|
||||||
True, if this chat has been flagged for scam. Supergroups, channels and bots only.
|
True, if this chat has been flagged for scam.
|
||||||
|
|
||||||
|
is_fake (``bool``, *optional*):
|
||||||
|
True, if this chat has been flagged for impersonation.
|
||||||
|
|
||||||
is_support (``bool``):
|
is_support (``bool``):
|
||||||
True, if this chat is part of the Telegram support team. Users and bots only.
|
True, if this chat is part of the Telegram support team. Users and bots only.
|
||||||
@ -125,6 +128,7 @@ class Chat(Object):
|
|||||||
is_restricted: bool = None,
|
is_restricted: bool = None,
|
||||||
is_creator: bool = None,
|
is_creator: bool = None,
|
||||||
is_scam: bool = None,
|
is_scam: bool = None,
|
||||||
|
is_fake: bool = None,
|
||||||
is_support: bool = None,
|
is_support: bool = None,
|
||||||
title: str = None,
|
title: str = None,
|
||||||
username: str = None,
|
username: str = None,
|
||||||
@ -152,6 +156,7 @@ class Chat(Object):
|
|||||||
self.is_restricted = is_restricted
|
self.is_restricted = is_restricted
|
||||||
self.is_creator = is_creator
|
self.is_creator = is_creator
|
||||||
self.is_scam = is_scam
|
self.is_scam = is_scam
|
||||||
|
self.is_fake = is_fake
|
||||||
self.is_support = is_support
|
self.is_support = is_support
|
||||||
self.title = title
|
self.title = title
|
||||||
self.username = username
|
self.username = username
|
||||||
@ -181,6 +186,7 @@ class Chat(Object):
|
|||||||
is_verified=getattr(user, "verified", None),
|
is_verified=getattr(user, "verified", None),
|
||||||
is_restricted=getattr(user, "restricted", None),
|
is_restricted=getattr(user, "restricted", None),
|
||||||
is_scam=getattr(user, "scam", None),
|
is_scam=getattr(user, "scam", None),
|
||||||
|
is_fake=getattr(user, "fake", None),
|
||||||
is_support=getattr(user, "support", None),
|
is_support=getattr(user, "support", None),
|
||||||
username=user.username,
|
username=user.username,
|
||||||
first_name=user.first_name,
|
first_name=user.first_name,
|
||||||
@ -219,6 +225,7 @@ class Chat(Object):
|
|||||||
is_restricted=getattr(channel, "restricted", None),
|
is_restricted=getattr(channel, "restricted", None),
|
||||||
is_creator=getattr(channel, "creator", None),
|
is_creator=getattr(channel, "creator", None),
|
||||||
is_scam=getattr(channel, "scam", None),
|
is_scam=getattr(channel, "scam", None),
|
||||||
|
is_fake=getattr(channel, "fake", None),
|
||||||
title=channel.title,
|
title=channel.title,
|
||||||
username=getattr(channel, "username", None),
|
username=getattr(channel, "username", None),
|
||||||
photo=types.ChatPhoto._parse(client, getattr(channel, "photo", None), peer_id, channel.access_hash),
|
photo=types.ChatPhoto._parse(client, getattr(channel, "photo", None), peer_id, channel.access_hash),
|
||||||
@ -860,10 +867,6 @@ class Chat(Object):
|
|||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
offset (``int``, *optional*):
|
|
||||||
Sequential number of the first member to be returned.
|
|
||||||
Only applicable to supergroups and channels. Defaults to 0 [1]_.
|
|
||||||
|
|
||||||
limit (``int``, *optional*):
|
limit (``int``, *optional*):
|
||||||
Limits the number of members to be retrieved.
|
Limits the number of members to be retrieved.
|
||||||
Only applicable to supergroups and channels.
|
Only applicable to supergroups and channels.
|
||||||
|
@ -91,6 +91,9 @@ class User(Object, Update):
|
|||||||
is_scam (``bool``, *optional*):
|
is_scam (``bool``, *optional*):
|
||||||
True, if this user has been flagged for scam.
|
True, if this user has been flagged for scam.
|
||||||
|
|
||||||
|
is_fake (``bool``, *optional*):
|
||||||
|
True, if this user has been flagged for impersonation.
|
||||||
|
|
||||||
is_support (``bool``, *optional*):
|
is_support (``bool``, *optional*):
|
||||||
True, if this user is part of the Telegram support team.
|
True, if this user is part of the Telegram support team.
|
||||||
|
|
||||||
@ -159,6 +162,7 @@ class User(Object, Update):
|
|||||||
is_verified: bool = None,
|
is_verified: bool = None,
|
||||||
is_restricted: bool = None,
|
is_restricted: bool = None,
|
||||||
is_scam: bool = None,
|
is_scam: bool = None,
|
||||||
|
is_fake: bool = None,
|
||||||
is_support: bool = None,
|
is_support: bool = None,
|
||||||
first_name: str = None,
|
first_name: str = None,
|
||||||
last_name: str = None,
|
last_name: str = None,
|
||||||
@ -183,6 +187,7 @@ class User(Object, Update):
|
|||||||
self.is_verified = is_verified
|
self.is_verified = is_verified
|
||||||
self.is_restricted = is_restricted
|
self.is_restricted = is_restricted
|
||||||
self.is_scam = is_scam
|
self.is_scam = is_scam
|
||||||
|
self.is_fake = is_fake
|
||||||
self.is_support = is_support
|
self.is_support = is_support
|
||||||
self.first_name = first_name
|
self.first_name = first_name
|
||||||
self.last_name = last_name
|
self.last_name = last_name
|
||||||
@ -215,6 +220,7 @@ class User(Object, Update):
|
|||||||
is_verified=user.verified,
|
is_verified=user.verified,
|
||||||
is_restricted=user.restricted,
|
is_restricted=user.restricted,
|
||||||
is_scam=user.scam,
|
is_scam=user.scam,
|
||||||
|
is_fake=user.fake,
|
||||||
is_support=user.support,
|
is_support=user.support,
|
||||||
first_name=user.first_name,
|
first_name=user.first_name,
|
||||||
last_name=user.last_name,
|
last_name=user.last_name,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user