API Reference ex_gram v0.24.0
Modules
ExGram main supervisor that starts the bot's registry.
Behaviour for HTTP adapters
HTTP Adapter that uses Maxwell
HTTP Adapter that uses Tesla
HTTP Adapter for testing, it allows you to setup request responses and errors
Bot creation helper.
Bot supervisor that starts the dispatcher and updates processes and tie them together
Context module for ExGram!
OLD. Can it be removed?
This module handles fetching values from the config with some additional niceties
Named process that receive the updates, apply the middlewares for the bot and call the bot's handler
Mini DSL to build answers based on the context easily.
Keyboard DSL to create inline keyboards easily
Helper module to encode/decode json
By default we will return nil, which will cause to use the default engine
This will reload the ExGram.Encoder.Engine module with the engine selected.
Helpers when dealing with telegram files
Handle behaviour for ExGram.Bot implementation
Type checker for the method executer.
Executer for the method macro, it takes care of checking the parameters, fetching the token, building the path and body, and calling the adapter.
Helpers for the ExGram.Macros module
Helper to make it easier to create middlewares
Macros for building bot settings like middlewares, commands and regex
Middleware that ignore the username in the command parameter.
Telegram API Model structures
BotCommandScope model. Valid subtypes: BotCommandScopeDefault, BotCommandScopeAllPrivateChats, BotCommandScopeAllGroupChats, BotCommandScopeAllChatAdministrators, BotCommandScopeChat, BotCommandScopeChatAdministrators, BotCommandScopeChatMember
ChatMember model. Valid subtypes: ChatMemberOwner, ChatMemberAdministrator, ChatMemberMember, ChatMemberRestricted, ChatMemberLeft, ChatMemberBanned
InlineQueryResult model. Valid subtypes: InlineQueryResultCachedAudio, InlineQueryResultCachedDocument, InlineQueryResultCachedGif, InlineQueryResultCachedMpeg4Gif, InlineQueryResultCachedPhoto, InlineQueryResultCachedSticker, InlineQueryResultCachedVideo, InlineQueryResultCachedVoice, InlineQueryResultArticle, InlineQueryResultAudio, InlineQueryResultContact, InlineQueryResultGame, InlineQueryResultDocument, InlineQueryResultGif, InlineQueryResultLocation, InlineQueryResultMpeg4Gif, InlineQueryResultPhoto, InlineQueryResultVenue, InlineQueryResultVideo, InlineQueryResultVoice
InputMessageContent model. Valid subtypes: InputTextMessageContent, InputLocationMessageContent, InputVenueMessageContent, InputContactMessageContent, InputInvoiceMessageContent
PassportElementError model. Valid subtypes: PassportElementErrorDataField, PassportElementErrorFrontSide, PassportElementErrorReverseSide, PassportElementErrorSelfie, PassportElementErrorFile, PassportElementErrorFiles, PassportElementErrorTranslationFile, PassportElementErrorTranslationFiles, PassportElementErrorUnspecified
Responses protocol to create easier context flows
Simple text answer, it uses send_message
Answer callback query response
Answer inline query response
Delete message response
Edit inline message response. It will detect the message and use it accordingly to edit the normal or inline message.
Edit markup response. It will detect the message and use it accordingly to edit the normal or inline message markup.
Helpers when dealing with bot's tokens
Updates implementation that just start a process but don't do anything
Updates implementation that uses polling method
Updates implementation for testing purposes
Mix Tasks
Mix task to create a basic bot module