View Source ExGram.Dsl (ex_gram v0.52.1)

Mini DSL to build answers based on the context easily.

Summary

Types

@type message_type() ::
  :text
  | :animation
  | :audio
  | :document
  | :photo
  | :sticker
  | :story
  | :video
  | :video_note
  | :voice
  | :contact
  | :dice
  | :game
  | :poll
  | :venue
  | :location
  | :invoice
  | :successful_payment
  | :giveaway
@type update_type() ::
  :message
  | :edited_message
  | :channel_post
  | :edited_channel_post
  | :message_reaction
  | :message_reaction_count
  | :inline_query
  | :chosen_inline_result
  | :callback_query
  | :shipping_query
  | :pre_checkout_query
  | :poll
  | :poll_answer
  | :my_chat_member
  | :chat_member
  | :chat_join_request
  | :chat_boost
  | :removed_chat_boost

Functions

Link to this function

answer(cnt, text, ops \\ [])

View Source
Link to this function

answer(cnt, m, text, ops)

View Source
Link to this function

answer_callback(cnt, msg, ops \\ [])

View Source
Link to this function

answer_document(cnt, document, ops \\ [])

View Source
Link to this function

answer_document(cnt, msg, document, ops)

View Source
Link to this function

answer_inline_query(cnt, articles, ops \\ [])

View Source
Link to this function

create_inline(data \\ [[]])

View Source
Link to this function

create_inline_button(row)

View Source
Link to this function

delete(cnt, msg, ops \\ [])

View Source
Link to this function

edit(cnt, atom, text, ops)

View Source
Link to this function

edit(cnt, arg2, m, text, ops)

View Source
Link to this function

extract_callback_id(cid)

View Source
@spec extract_chat(ExGram.Model.Update.t()) :: {:ok, ExGram.Model.Chat.t()} | :error
@spec extract_group(ExGram.Model.Update.t()) :: {:ok, ExGram.Model.Chat.t()} | :error
@spec extract_id(ExGram.Model.Update.t()) :: {:ok, integer()} | -1
Link to this function

extract_inline_id_params(m)

View Source
Link to this function

extract_message_id(arg1)

View Source
Link to this function

extract_message_type(arg1)

View Source
@spec extract_message_type(ExGram.Model.Message.t()) :: {:ok, message_type()} | :error
Link to this function

extract_response_id(map)

View Source
Link to this function

extract_update_type(arg1)

View Source
@spec extract_update_type(ExGram.Model.Update.t()) :: {:ok, update_type()} | :error
@spec extract_user(ExGram.Model.Update.t()) :: {:ok, ExGram.Model.User.t()} | :error