peyk.platforms.telegram.types.link_preview_options¶
Classes
|
Describes the options used for link preview generation. |
- class peyk.platforms.telegram.types.link_preview_options.LinkPreviewOptions(is_disabled: bool | None = None, url: str | None = None, prefer_small_media: bool | None = None, prefer_large_media: bool | None = None, show_above_text: bool | None = None)[source]¶
Bases:
objectDescribes the options used for link preview generation.
- Variables:
is_disabled (bool | None) – True, if the link preview is disabled
url (str | None) – URL to use for the link preview. If empty, then the first URL found in the message text will be used.
prefer_small_media (bool | None) – 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
prefer_large_media (bool | None) – 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
show_above_text (bool | None) – True, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text
- is_disabled: bool | None = None¶
- url: str | None = None¶
- prefer_small_media: bool | None = None¶
- prefer_large_media: bool | None = None¶
- show_above_text: bool | None = None¶
- classmethod from_dict(data: dict | None) LinkPreviewOptions | None[source]¶
Parse a Telegram API mapping into this type.
- Parameters:
data – Raw Telegram API mapping, or
None.- Returns:
Parsed type instance, or
NonewhendataisNone.