Nadia.InputRichMessageMedia (nadia v1.7.0)

View Source

Typed builder for Telegram InputRichMessageMedia objects.

Each media entry binds the id used by tg://photo?id=, tg://video?id=, tg://document?id=, or tg://audio?id= links to an Nadia.InputMedia value. When no id is given, one is derived from the media file name or string source. Nadia validates id shape (1-64 ASCII letters, digits, underscore, or hyphen) and the media value; Telegram validates the referenced media types.

Summary

Types

t()

A typed Telegram InputRichMessageMedia value. Its representation is opaque.

Functions

Builds an embedded rich-message media entry.

Types

t()

@opaque t()

A typed Telegram InputRichMessageMedia value. Its representation is opaque.

Functions

new(id \\ nil, media)

@spec new(binary() | nil, Nadia.InputMedia.t() | map() | binary()) :: t()

Builds an embedded rich-message media entry.

id may be omitted; it is then derived from the media source. media is an Nadia.InputMedia value, a map, or a pre-encoded JSON binary.