InputMedia

@Serializable
sealed class InputMedia : ImplicitMediaData

This object represents the content of a media message to be sent. It should be one of

  • InputMediaAnimation

  • InputMediaDocument

  • InputMediaAudio

  • InputMediaPhoto

  • InputMediaVideo

Api reference

Inheritors

Types

Link copied to clipboard
@Serializable
@SerialName(value = "animation")
data class Animation(var media: ImplicitFile, var thumbnail: ImplicitFile? = null, val caption: String? = null, val parseMode: ParseMode? = null, val captionEntities: List<MessageEntity>? = null, val width: Int? = null, val height: Int? = null, val duration: Int? = null, val hasSpoiler: Boolean? = null, val showCaptionAboveMedia: Boolean? = null) : InputMedia
Link copied to clipboard
@Serializable
@SerialName(value = "audio")
data class Audio(var media: ImplicitFile, var thumbnail: ImplicitFile? = null, val caption: String? = null, val parseMode: ParseMode? = null, val captionEntities: List<MessageEntity>? = null, val duration: Int? = null, val performer: String? = null, val title: String? = null) : InputMedia
Link copied to clipboard
@Serializable
@SerialName(value = "document")
data class Document(var media: ImplicitFile, var thumbnail: ImplicitFile? = null, val caption: String? = null, val parseMode: ParseMode? = null, val captionEntities: List<MessageEntity>? = null, val disableContentTypeDetection: Boolean? = null) : InputMedia
Link copied to clipboard
@Serializable
@SerialName(value = "photo")
data class Photo(var media: ImplicitFile, val caption: String? = null, val parseMode: ParseMode? = null, val captionEntities: List<MessageEntity>? = null, val hasSpoiler: Boolean? = null, val showCaptionAboveMedia: Boolean? = null) : InputMedia
Link copied to clipboard
@Serializable
@SerialName(value = "video")
data class Video(var media: ImplicitFile, var thumbnail: ImplicitFile? = null, val caption: String? = null, val parseMode: ParseMode? = null, val captionEntities: List<MessageEntity>? = null, val width: Int? = null, val height: Int? = null, val duration: Int? = null, val supportsStreaming: Boolean? = null, val hasSpoiler: Boolean? = null, val showCaptionAboveMedia: Boolean? = null) : InputMedia

Properties

Link copied to clipboard
abstract var media: ImplicitFile
Link copied to clipboard
Link copied to clipboard