Source code for hydrogram.raw.functions.messages.get_saved_dialogs
# Hydrogram - Telegram MTProto API Client Library for Python# Copyright (C) 2023-present Hydrogram <https://hydrogram.org>## This file is part of Hydrogram.## Hydrogram is free software: you can redistribute it and/or modify# it under the terms of the GNU Lesser General Public License as published# by the Free Software Foundation, either version 3 of the License, or# (at your option) any later version.## Hydrogram is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the# GNU Lesser General Public License for more details.## You should have received a copy of the GNU Lesser General Public License# along with Hydrogram. If not, see <http://www.gnu.org/licenses/>.fromioimportBytesIOfromhydrogram.raw.core.primitivesimportInt,Long,Int128,Int256,Bool,Bytes,String,Double,Vectorfromhydrogram.raw.coreimportTLObjectfromhydrogramimportrawfromtypingimportList,Optional,Any# # # # # # # # # # # # # # # # # # # # # # # ## !!! WARNING !!! ## This is a generated file! ## All changes made in this file will be lost! ## # # # # # # # # # # # # # # # # # # # # # # #
[docs]classGetSavedDialogs(TLObject):# type: ignore"""Returns the current saved dialog list, see here » for more info. Details: - Layer: ``181`` - ID: ``5381D21A`` Parameters: offset_date (``int`` ``32-bit``): Offsets for pagination, for more info click here offset_id (``int`` ``32-bit``): Offsets for pagination, for more info click here (top_message ID used for pagination) offset_peer (:obj:`InputPeer <hydrogram.raw.base.InputPeer>`): Offset peer for pagination limit (``int`` ``32-bit``): Number of list elements to be returned hash (``int`` ``64-bit``): Hash for pagination, for more info click here exclude_pinned (``bool``, *optional*): Exclude pinned dialogs Returns: :obj:`messages.SavedDialogs <hydrogram.raw.base.messages.SavedDialogs>` """__slots__:List[str]=["offset_date","offset_id","offset_peer","limit","hash","exclude_pinned"]ID=0x5381d21aQUALNAME="functions.messages.GetSavedDialogs"def__init__(self,*,offset_date:int,offset_id:int,offset_peer:"raw.base.InputPeer",limit:int,hash:int,exclude_pinned:Optional[bool]=None)->None:self.offset_date=offset_date# intself.offset_id=offset_id# intself.offset_peer=offset_peer# InputPeerself.limit=limit# intself.hash=hash# longself.exclude_pinned=exclude_pinned# flags.0?true@staticmethoddefread(b:BytesIO,*args:Any)->"GetSavedDialogs":flags=Int.read(b)exclude_pinned=Trueifflags&(1<<0)elseFalseoffset_date=Int.read(b)offset_id=Int.read(b)offset_peer=TLObject.read(b)limit=Int.read(b)hash=Long.read(b)returnGetSavedDialogs(offset_date=offset_date,offset_id=offset_id,offset_peer=offset_peer,limit=limit,hash=hash,exclude_pinned=exclude_pinned)defwrite(self,*args)->bytes:b=BytesIO()b.write(Int(self.ID,False))flags=0flags|=(1<<0)ifself.exclude_pinnedelse0b.write(Int(flags))b.write(Int(self.offset_date))b.write(Int(self.offset_id))b.write(self.offset_peer.write())b.write(Int(self.limit))b.write(Long(self.hash))returnb.getvalue()