mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-29 05:18:10 +00:00
Clean User type
This commit is contained in:
parent
730d5e74f0
commit
b8473c9f7f
@ -44,13 +44,30 @@ class User(Object):
|
|||||||
language_code (``str``, optional):
|
language_code (``str``, optional):
|
||||||
IETF language tag of the user's language.
|
IETF language tag of the user's language.
|
||||||
|
|
||||||
|
phone_number (``str``, optional):
|
||||||
|
User's or bot's phone number.
|
||||||
|
|
||||||
|
photo (obj:`ChatPhoto <pyrogram.types.ChatPhoto>`, optional):
|
||||||
|
User's or bot's current profile photo.
|
||||||
"""
|
"""
|
||||||
ID = 0xb0700001
|
ID = 0xb0700001
|
||||||
|
|
||||||
def __init__(self, id, is_bot, first_name, last_name=None, username=None, language_code=None):
|
def __init__(
|
||||||
self.id = id # int
|
self,
|
||||||
self.is_bot = is_bot # Bool
|
id: int,
|
||||||
self.first_name = first_name # string
|
is_bot: bool,
|
||||||
self.last_name = last_name # flags.0?string
|
first_name: str,
|
||||||
self.username = username # flags.1?string
|
last_name: str = None,
|
||||||
self.language_code = language_code # flags.2?string
|
username: str = None,
|
||||||
|
language_code: str = None,
|
||||||
|
phone_number: str = None,
|
||||||
|
photo=None
|
||||||
|
):
|
||||||
|
self.id = id
|
||||||
|
self.is_bot = is_bot
|
||||||
|
self.first_name = first_name
|
||||||
|
self.last_name = last_name
|
||||||
|
self.username = username
|
||||||
|
self.language_code = language_code
|
||||||
|
self.phone_number = phone_number
|
||||||
|
self.photo = photo
|
||||||
|
Loading…
x
Reference in New Issue
Block a user