TelegramEx.Builder.Video (TelegramEx v1.3.0)

Copy Markdown View Source

Builder for video payloads.

Supports file IDs, URLs, local files, duration, cover images, and silent sends. See Messages and Media.

Summary

Functions

Sets the video cover image from a local file path.

Sets the video cover image from a URL.

Sets the video duration in seconds.

Sets the video by Telegram file ID.

Sets the video from a local file path.

Sends the video to the specified chat.

Sends the video without notification sound.

Sets the video from a URL.

Types

input()

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

Functions

cover_path(input, path)

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

Sets the video cover image from a local file path.

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

cover_url(input, url)

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

Sets the video cover image from a URL.

duration(input, seconds)

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

Sets the video duration in seconds.

id(input, id)

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

Sets the video by Telegram file ID.

path(input, path)

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

Sets the video 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 video to the specified chat.

silent(input)

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

Sends the video without notification sound.

url(input, url)

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

Sets the video from a URL.