Message.edit_caption()

Message.edit_caption()

Bound method edit_caption of Message.

Use as a shortcut for:

client.edit_message_caption(
    chat_id=message.chat.id,
    message_id=message.message_id,
    caption="hello"
)

Example

message.edit_caption("hello")
Parameters
  • caption (str) – New caption of the message.

  • parse_mode (str, optional) – By default, texts are parsed using both Markdown and HTML styles. You can combine both syntaxes together. Pass “markdown” or “md” to enable Markdown-style parsing only. Pass “html” to enable HTML-style parsing only. Pass None to completely disable style parsing.

  • reply_markup (InlineKeyboardMarkup, optional) – An InlineKeyboardMarkup object.

Returns

On success, the edited Message is returned.

Raises

RPCError – In case of a Telegram RPC error.