Nadia.InputSticker (nadia v1.6.1)

View Source

Typed builders for stickers used by sticker-set methods.

Each builder fixes Telegram's format, requires 1-20 emoji strings, omits nil fields, and preserves explicit false values. Static stickers may use a file ID, HTTP URL, or Nadia.InputFile; animated and video stickers cannot use HTTP URLs.

:mask_position is meaningful only for mask sets. :keywords is meaningful only for regular and custom-emoji sets and accepts at most 20 strings whose combined length is at most 64 characters.

Summary

Types

t()

A typed Telegram InputSticker value. Its representation is opaque.

Functions

Builds an animated TGS sticker. HTTP URLs are rejected.

Builds a static WEBP or PNG sticker.

Builds a video WEBM sticker. HTTP URLs are rejected.

Types

options()

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

source()

@type source() :: binary() | Nadia.InputFile.t()

t()

@opaque t()

A typed Telegram InputSticker value. Its representation is opaque.

Functions

animated(sticker, emoji_list, options \\ [])

@spec animated(source(), [binary()], options()) :: t()

Builds an animated TGS sticker. HTTP URLs are rejected.

static(sticker, emoji_list, options \\ [])

@spec static(source(), [binary()], options()) :: t()

Builds a static WEBP or PNG sticker.

video(sticker, emoji_list, options \\ [])

@spec video(source(), [binary()], options()) :: t()

Builds a video WEBM sticker. HTTP URLs are rejected.