CallbackQuery.edit_message_caption()

CallbackQuery.edit_message_caption()

Edit the caption of media messages attached to callback queries.

Bound method edit_message_caption of CallbackQuery.

Parameters:
  • caption (``str``) – New caption of the message.

  • parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*) – By default, texts are parsed using both Markdown and HTML styles. You can combine both syntaxes together.

  • caption_entities (List of :obj:`~pyrogram.types.MessageEntity`) – List of special entities that appear in message text, which can be specified instead of parse_mode.

  • reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*) – An InlineKeyboardMarkup object.

Returns:

  • :obj:`~pyrogram.types.Message` | ``bool`` (On success, if the edited message was sent by the bot, the edited)

  • message is returned, otherwise True is returned (message sent via the bot, as inline query result).

Raises:

RPCError –