mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-29 05:18:10 +00:00
Clean Chat type
This commit is contained in:
parent
b8473c9f7f
commit
3609d37752
@ -27,7 +27,9 @@ class Chat(Object):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
id (``int`` ``32-bit``):
|
id (``int`` ``32-bit``):
|
||||||
Unique identifier for this chat. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.
|
Unique identifier for this chat. This number may be greater than 32 bits and some programming
|
||||||
|
languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits,
|
||||||
|
so a signed 64 bit integer or double-precision float type are safe for storing this identifier.
|
||||||
|
|
||||||
type (``str``):
|
type (``str``):
|
||||||
Type of chat, can be either "private", "group", "supergroup" or "channel".
|
Type of chat, can be either "private", "group", "supergroup" or "channel".
|
||||||
@ -68,17 +70,32 @@ class Chat(Object):
|
|||||||
"""
|
"""
|
||||||
ID = 0xb0700002
|
ID = 0xb0700002
|
||||||
|
|
||||||
def __init__(self, id, type, title=None, username=None, first_name=None, last_name=None, all_members_are_administrators=None, photo=None, description=None, invite_link=None, pinned_message=None, sticker_set_name=None, can_set_sticker_set=None):
|
def __init__(
|
||||||
self.id = id # int
|
self,
|
||||||
self.type = type # string
|
id: int,
|
||||||
self.title = title # flags.0?string
|
type: str,
|
||||||
self.username = username # flags.1?string
|
title: str = None,
|
||||||
self.first_name = first_name # flags.2?string
|
username: str = None,
|
||||||
self.last_name = last_name # flags.3?string
|
first_name: str = None,
|
||||||
self.all_members_are_administrators = all_members_are_administrators # flags.4?Bool
|
last_name: str = None,
|
||||||
self.photo = photo # flags.5?ChatPhoto
|
all_members_are_administrators: bool = None,
|
||||||
self.description = description # flags.6?string
|
photo=None,
|
||||||
self.invite_link = invite_link # flags.7?string
|
description: str = None,
|
||||||
self.pinned_message = pinned_message # flags.8?Message
|
invite_link: str = None,
|
||||||
self.sticker_set_name = sticker_set_name # flags.9?string
|
pinned_message=None,
|
||||||
self.can_set_sticker_set = can_set_sticker_set # flags.10?Bool
|
sticker_set_name: str = None,
|
||||||
|
can_set_sticker_set: bool = None
|
||||||
|
):
|
||||||
|
self.id = id
|
||||||
|
self.type = type
|
||||||
|
self.title = title
|
||||||
|
self.username = username
|
||||||
|
self.first_name = first_name
|
||||||
|
self.last_name = last_name
|
||||||
|
self.all_members_are_administrators = all_members_are_administrators
|
||||||
|
self.photo = photo
|
||||||
|
self.description = description
|
||||||
|
self.invite_link = invite_link
|
||||||
|
self.pinned_message = pinned_message
|
||||||
|
self.sticker_set_name = sticker_set_name
|
||||||
|
self.can_set_sticker_set = can_set_sticker_set
|
||||||
|
Loading…
x
Reference in New Issue
Block a user