LinkPreviewOptions

@Serializable
data class LinkPreviewOptions(var isDisabled: Boolean? = null, var url: String? = null, var preferSmallMedia: Boolean? = null, var preferLargeMedia: Boolean? = null, var showAboveText: Boolean? = null)

Describes the options used for link preview generation.

Api reference

Constructors

Link copied to clipboard
constructor(isDisabled: Boolean? = null, url: String? = null, preferSmallMedia: Boolean? = null, preferLargeMedia: Boolean? = null, showAboveText: Boolean? = null)

Properties

Link copied to clipboard

Optional. True, if the link preview is disabled

Link copied to clipboard

Optional. True, if the media in the link preview is supposed to be enlarged; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview

Link copied to clipboard

Optional. True, if the media in the link preview is supposed to be shrunk; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview

Link copied to clipboard

Optional. True, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text

Link copied to clipboard
var url: String?

Optional. URL to use for the link preview. If empty, then the first URL found in the message text will be used