Source code for hydrogram.raw.functions.stickers.change_sticker_position
# 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]classChangeStickerPosition(TLObject):# type: ignore"""Changes the absolute position of a sticker in the set to which it belongs; for bots only. The sticker set must have been created by the bot Details: - Layer: ``181`` - ID: ``FFB6D4CA`` Parameters: sticker (:obj:`InputDocument <hydrogram.raw.base.InputDocument>`): The sticker position (``int`` ``32-bit``): The new position of the sticker, zero-based Returns: :obj:`messages.StickerSet <hydrogram.raw.base.messages.StickerSet>` """__slots__:List[str]=["sticker","position"]ID=0xffb6d4caQUALNAME="functions.stickers.ChangeStickerPosition"def__init__(self,*,sticker:"raw.base.InputDocument",position:int)->None:self.sticker=sticker# InputDocumentself.position=position# int@staticmethoddefread(b:BytesIO,*args:Any)->"ChangeStickerPosition":# No flagssticker=TLObject.read(b)position=Int.read(b)returnChangeStickerPosition(sticker=sticker,position=position)defwrite(self,*args)->bytes:b=BytesIO()b.write(Int(self.ID,False))# No flagsb.write(self.sticker.write())b.write(Int(self.position))returnb.getvalue()