Jido.Chat.Telegram.MediaMessage (Jido Chat Telegram v1.0.0)

Copy Markdown View Source

Typed Telegram media send result (photo/document/media-group).

Summary

Functions

Builds media message from serialized map data.

Creates a typed media send result.

Returns the Zoi schema for MediaMessage.

Serializes media message into plain map with type marker.

Types

t()

@type t() :: %Jido.Chat.Telegram.MediaMessage{
  caption: nil | binary(),
  chat_id: nil | any(),
  date: nil | any(),
  file_id: nil | binary(),
  id: binary(),
  kind: :photo | :document | :media_group,
  message_id: nil | binary(),
  metadata: map(),
  raw: nil | any()
}

Functions

from_map(map)

@spec from_map(map()) :: t()

Builds media message from serialized map data.

new(attrs)

@spec new(map()) :: t()

Creates a typed media send result.

schema()

Returns the Zoi schema for MediaMessage.

to_map(result)

@spec to_map(t()) :: map()

Serializes media message into plain map with type marker.