peyk.platforms.telegram.types.input_rich_message

Classes

InputRichMessage([text, parse_mode, blocks, ...])

Describes a rich message to be sent.

class peyk.platforms.telegram.types.input_rich_message.InputRichMessage(text: str | None = None, parse_mode: str | None = None, blocks: object | None = None, media: object | None = None, is_rtl: bool | None = None, skip_entity_detection: bool | None = None)[source]

Bases: object

Describes a rich message to be sent. Exactly one of the fields html, markdown, or blocks must be used.

Variables:
  • html – Content of the rich message to send described using HTML formatting. See rich message formatting options for more details. Use media field to specify the media used in the message.

  • markdown – Content of the rich message to send described using Markdown formatting. See rich message formatting options for more details. Use media field to specify the media used in the message.

  • is_rtl (bool | None) – Pass True if the rich message must be shown right-to-left

  • skip_entity_detection (bool | None) – Pass True to skip automatic detection of entities (e.g., URLs, email addresses, username mentions, hashtags, cashtags, bot commands, or phone numbers) in the text

  • blocks (object | None) – Content of the rich message to send described as a list of blocks

  • media (object | None) – List of media that are specified in the markdown or html fields using tg://photo?id=, tg://video?id=, and tg://audio?id= links

text: str | None = None
parse_mode: str | None = None
blocks: object | None = None
media: object | None = None
is_rtl: bool | None = None
skip_entity_detection: bool | None = None
to_dict() Dict[str, object][source]

Provides the to dict operation for the Telegram integration.

Returns:

Result produced by the operation.

classmethod from_dict(data: dict | None) InputRichMessage | None[source]

Provides the from dict operation for the Telegram integration.

Parameters:

data – Value used by this operation.

Returns:

Result produced by the operation.