TelegramEx.Builder.Photo (TelegramEx v1.3.0)

Copy Markdown View Source

Builder for photo payloads.

Supports URLs, local file paths, captions, parse modes, and silent sends. See Messages and Media.

Summary

Functions

Sets the photo caption.

Sets the photo caption with parse mode.

Sets the photo from a local file path.

Sends the photo to the specified chat.

Sends the photo without notification sound.

Sets the photo from a URL.

Types

input()

@type input() :: map() | TelegramEx.Effect.t()

Functions

caption(input, caption)

@spec caption(input(), String.t()) :: TelegramEx.Effect.t()

Sets the photo caption.

caption(input, caption, parse_mode)

@spec caption(input(), String.t(), String.t()) :: TelegramEx.Effect.t()

Sets the photo caption with parse mode.

path(input, path)

@spec path(input(), String.t()) :: TelegramEx.Effect.t()

Sets the photo from a local file path.

If the file cannot be read, the returned effect contains {:file, reason}.

send(input, id)

@spec send(input(), integer()) :: TelegramEx.Effect.t()

Sends the photo to the specified chat.

silent(input)

@spec silent(input()) :: TelegramEx.Effect.t()

Sends the photo without notification sound.

url(input, url)

@spec url(input(), String.t()) :: TelegramEx.Effect.t()

Sets the photo from a URL.