Skip to content

editMessageMedia

Function · TDLib 1.8.67 · d1085f9c

Edits the media content of a message, including message caption. If only the caption needs to be edited, use editMessageCaption instead. The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa. Returns the edited message after the edit is completed on the server side

editMessageMedia(
  chat_id: int53,
  message_id: int53,
  reply_markup: ReplyMarkup,
  input_message_content: InputMessageContent
) → Message

chat_id

int53

The chat the message belongs to

message_id

int53

Identifier of the message. Use messageProperties.can_edit_media to check whether the message can be edited

reply_markup

ReplyMarkup

The new message reply markup; pass null if none; for bots only

input_message_content

InputMessageContent

New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo