Mini DSL to build answers based on the context (ExGram.Cnt) easily.
This module is automatically imported when using ExGram.Bot. Functions in this
module allow you to build responses declaratively by chaining operations on the
context. The responses are queued and executed after your handler returns.
See the Sending Messages guide for detailed usage examples.
Summary
Functions
Deprecated, use create_inline_keyboard/1 instead
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
| :business_connection
| :business_message
| :edited_business_message
| :deleted_business_messages
| :message_reaction
| :message_reaction_count
| :inline_query
| :chosen_inline_result
| :callback_query
| :shipping_query
| :pre_checkout_query
| :purchased_paid_media
| :poll
| :poll_answer
| :my_chat_member
| :chat_member
| :chat_join_request
| :chat_boost
| :removed_chat_boost
Functions
@spec answer(ExGram.Cnt.t(), String.t(), keyword()) :: ExGram.Cnt.t()
@spec answer(ExGram.Cnt.t(), ExGram.Model.Message.t(), String.t()) :: ExGram.Cnt.t()
@spec answer(ExGram.Cnt.t(), ExGram.Model.Message.t(), String.t(), keyword()) :: ExGram.Cnt.t()
@spec answer_callback(ExGram.Cnt.t(), ExGram.Model.Message.t(), keyword()) :: ExGram.Cnt.t()
@spec answer_document(ExGram.Cnt.t(), ExGram.File.file(), keyword()) :: ExGram.Cnt.t()
@spec answer_document(ExGram.Cnt.t(), ExGram.Model.Message.t(), ExGram.File.file()) :: ExGram.Cnt.t()
@spec answer_document( ExGram.Cnt.t(), ExGram.Model.Message.t(), ExGram.File.file(), keyword() ) :: ExGram.Cnt.t()
@spec answer_inline_query( ExGram.Cnt.t(), [ExGram.Model.InlineQueryResult.t()], keyword() ) :: ExGram.Cnt.t()
Deprecated, use create_inline_keyboard/1 instead
@spec create_inline_keyboard([[map() | keyword()]]) :: ExGram.Model.InlineKeyboardMarkup.t()
@spec create_reply_keyboard( [[map() | keyword()]], keyword() ) :: ExGram.Model.ReplyKeyboardMarkup.t()
@spec delete(ExGram.Cnt.t()) :: ExGram.Cnt.t()
@spec delete(ExGram.Cnt.t(), ExGram.Model.Message.t() | nil) :: ExGram.Cnt.t()
@spec delete(ExGram.Cnt.t(), ExGram.Model.Message.t(), keyword()) :: ExGram.Cnt.t()
@spec edit(ExGram.Cnt.t(), :inline, String.t()) :: ExGram.Cnt.t()
@spec edit(ExGram.Cnt.t(), :markup, keyword()) :: ExGram.Cnt.t()
@spec edit(ExGram.Cnt.t(), :inline, String.t(), keyword()) :: ExGram.Cnt.t()
@spec edit(ExGram.Cnt.t(), :markup, ExGram.Model.Message.t(), keyword()) :: ExGram.Cnt.t()
@spec edit(ExGram.Cnt.t(), :inline, ExGram.Model.Message.t(), String.t(), keyword()) :: ExGram.Cnt.t()
@spec edit(ExGram.Cnt.t(), :markup, ExGram.Model.Message.t(), String.t(), keyword()) :: ExGram.Cnt.t()
@spec extract_chat(ExGram.Model.Update.t()) :: {:ok, ExGram.Model.Chat.t()} | :error
@spec extract_group(ExGram.Model.Update.t() | ExGram.Model.Message.t()) :: {:ok, ExGram.Model.Chat.t()} | :error
@spec extract_id(ExGram.Model.Update.t() | ExGram.Model.Message.t()) :: {:ok, integer()} | -1
@spec extract_message_type(ExGram.Model.Message.t()) :: {:ok, message_type()} | :error
@spec extract_update_type(ExGram.Model.Update.t()) :: {:ok, update_type()} | :error
@spec extract_user(ExGram.Model.Update.t() | ExGram.Model.Message.t()) :: {:ok, ExGram.Model.User.t()} | :error
@spec on_result(ExGram.Cnt.t(), (response :: any(), name :: atom() -> any())) :: ExGram.Cnt.t()
@spec send_answers(ExGram.Cnt.t()) :: ExGram.Cnt.t()