Nadia.InputPollOption (nadia v1.6.1)

View Source

Typed builder for a Telegram poll option.

Poll-option text must contain 1 to 100 valid UTF-8 characters. Optional formatting can be supplied with either :text_parse_mode or :text_entities, but not both.

Typed media is checked against Telegram's poll-option media families. Nadia.InputMedia audio and document values are rejected, while raw media values remain available as compatibility inputs. Telegram currently permits only custom emoji entities in option text and remains responsible for validating entity offsets and formatting semantics.

Summary

Types

t()

A typed Telegram InputPollOption value. Its representation is opaque.

Functions

Builds a poll option.

Types

options()

@type options() :: keyword() | map()

t()

@opaque t()

A typed Telegram InputPollOption value. Its representation is opaque.

Functions

new(text, options \\ [])

@spec new(binary(), options()) :: t()

Builds a poll option.

Supported options are :text_parse_mode, :text_entities, and :media. Options whose value is nil are omitted.