MessageKtx.editMedia - libtd-ktx

Kotlin Coroutines extensions for Telegram API TDLib (Telegram Database library)


libtd-ktx / kotlinx.telegram.extensions / MessageKtx / editMedia

editMedia

open suspend fun Message.editMedia(chatId: Long, replyMarkup: ReplyMarkup?, inputMessageContent: InputMessageContent?): Message

Suspend function, which edits the content of a message with an animation, an audio, a document, a photo or a video. The media in the message can’t be replaced if the message was set to self-destruct. Media can’t be replaced by self-destructing media. Media in an album can be edited only to contain a photo or a video. Returns the edited message after the edit is completed on the server side.

Parameters

chatId - The chat the message belongs to.

replyMarkup - The new message reply markup; for bots only.

inputMessageContent - New content of the message. Must be one of the following types: InputMessageAnimation, InputMessageAudio, InputMessageDocument, InputMessagePhoto or InputMessageVideo.

Return TdApi.Message Describes a message.