Source code for hydrogram.raw.functions.messages.reorder_pinned_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]classReorderPinnedDialogs(TLObject):# type: ignore"""Reorder pinned dialogs Details: - Layer: ``181`` - ID: ``3B1ADF37`` Parameters: folder_id (``int`` ``32-bit``): Peer folder ID, for more info click here order (List of :obj:`InputDialogPeer <hydrogram.raw.base.InputDialogPeer>`): New dialog order force (``bool``, *optional*): If set, dialogs pinned server-side but not present in the order field will be unpinned. Returns: ``bool`` """__slots__:List[str]=["folder_id","order","force"]ID=0x3b1adf37QUALNAME="functions.messages.ReorderPinnedDialogs"def__init__(self,*,folder_id:int,order:List["raw.base.InputDialogPeer"],force:Optional[bool]=None)->None:self.folder_id=folder_id# intself.order=order# Vector<InputDialogPeer>self.force=force# flags.0?true@staticmethoddefread(b:BytesIO,*args:Any)->"ReorderPinnedDialogs":flags=Int.read(b)force=Trueifflags&(1<<0)elseFalsefolder_id=Int.read(b)order=TLObject.read(b)returnReorderPinnedDialogs(folder_id=folder_id,order=order,force=force)defwrite(self,*args)->bytes:b=BytesIO()b.write(Int(self.ID,False))flags=0flags|=(1<<0)ifself.forceelse0b.write(Int(flags))b.write(Int(self.folder_id))b.write(Vector(self.order))returnb.getvalue()