GramIO API Reference / @gramio/contexts/dist / LinkPreviewOptions
Class: LinkPreviewOptions
Defined in: contexts/index.d.ts:1660
Describes the options used for link preview generation.
Constructors
Constructor
new LinkPreviewOptions(
payload):LinkPreviewOptions
Defined in: contexts/index.d.ts:1662
Parameters
| Parameter | Type |
|---|---|
payload | TelegramLinkPreviewOptions |
Returns
LinkPreviewOptions
Properties
| Property | Type | Defined in |
|---|---|---|
payload | TelegramLinkPreviewOptions | contexts/index.d.ts:1661 |
Accessors
[toStringTag]
Get Signature
get [toStringTag]():
string
Defined in: contexts/index.d.ts:1664
Returns
string
url
Get Signature
get url():
string
Defined in: contexts/index.d.ts:1668
URL to use for the link preview. If empty, then the first URL found in the message text will be used
Returns
string
Methods
isDisabled()
isDisabled():
boolean
Defined in: contexts/index.d.ts:1666
true, if the link preview is disabled
Returns
boolean
preferLargeMedia()
preferLargeMedia():
boolean
Defined in: contexts/index.d.ts:1672
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
Returns
boolean
preferSmallMedia()
preferSmallMedia():
boolean
Defined in: contexts/index.d.ts:1670
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
Returns
boolean
showAboveText()
showAboveText():
boolean
Defined in: contexts/index.d.ts:1674
true, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text
Returns
boolean