Source code for hydrogram.raw.functions.messages.edit_inline_bot_message
# 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]classEditInlineBotMessage(TLObject):# type: ignore"""Edit an inline bot message Details: - Layer: ``181`` - ID: ``83557DBA`` Parameters: id (:obj:`InputBotInlineMessageID <hydrogram.raw.base.InputBotInlineMessageID>`): Sent inline message ID no_webpage (``bool``, *optional*): Disable webpage preview invert_media (``bool``, *optional*): If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. message (``str``, *optional*): Message media (:obj:`InputMedia <hydrogram.raw.base.InputMedia>`, *optional*): Media reply_markup (:obj:`ReplyMarkup <hydrogram.raw.base.ReplyMarkup>`, *optional*): Reply markup for inline keyboards entities (List of :obj:`MessageEntity <hydrogram.raw.base.MessageEntity>`, *optional*): Message entities for styled text Returns: ``bool`` """__slots__:List[str]=["id","no_webpage","invert_media","message","media","reply_markup","entities"]ID=0x83557dbaQUALNAME="functions.messages.EditInlineBotMessage"def__init__(self,*,id:"raw.base.InputBotInlineMessageID",no_webpage:Optional[bool]=None,invert_media:Optional[bool]=None,message:Optional[str]=None,media:"raw.base.InputMedia"=None,reply_markup:"raw.base.ReplyMarkup"=None,entities:Optional[List["raw.base.MessageEntity"]]=None)->None:self.id=id# InputBotInlineMessageIDself.no_webpage=no_webpage# flags.1?trueself.invert_media=invert_media# flags.16?trueself.message=message# flags.11?stringself.media=media# flags.14?InputMediaself.reply_markup=reply_markup# flags.2?ReplyMarkupself.entities=entities# flags.3?Vector<MessageEntity>@staticmethoddefread(b:BytesIO,*args:Any)->"EditInlineBotMessage":flags=Int.read(b)no_webpage=Trueifflags&(1<<1)elseFalseinvert_media=Trueifflags&(1<<16)elseFalseid=TLObject.read(b)message=String.read(b)ifflags&(1<<11)elseNonemedia=TLObject.read(b)ifflags&(1<<14)elseNonereply_markup=TLObject.read(b)ifflags&(1<<2)elseNoneentities=TLObject.read(b)ifflags&(1<<3)else[]returnEditInlineBotMessage(id=id,no_webpage=no_webpage,invert_media=invert_media,message=message,media=media,reply_markup=reply_markup,entities=entities)defwrite(self,*args)->bytes:b=BytesIO()b.write(Int(self.ID,False))flags=0flags|=(1<<1)ifself.no_webpageelse0flags|=(1<<16)ifself.invert_mediaelse0flags|=(1<<11)ifself.messageisnotNoneelse0flags|=(1<<14)ifself.mediaisnotNoneelse0flags|=(1<<2)ifself.reply_markupisnotNoneelse0flags|=(1<<3)ifself.entitieselse0b.write(Int(flags))b.write(self.id.write())ifself.messageisnotNone:b.write(String(self.message))ifself.mediaisnotNone:b.write(self.media.write())ifself.reply_markupisnotNone:b.write(self.reply_markup.write())ifself.entitiesisnotNone:b.write(Vector(self.entities))returnb.getvalue()