Unreleased

[0.64.0]

  • Add Bot init hooks, allow to hook on bot's init to execute custom methods.
  • Add get_me: boolean() option to use ExGram.Bot to enable/disable initial get_me. It's enabled by default.
  • Breaking: Now to disable initial get_me call, instead of using a hardcoded username it's get_me: false

[0.63.0]

  • Spawn on handler attaching opentelemetry context if provided
  • Add opentelemetry guide

[0.62.0]

  • Add :telemetry integration
  • Improve testing capabilities using :telemetry to automatically call ExGram.Test.allow on the bot's dispatcher and updates

[0.61.0]

  • Keyboards detect row of rows and unwraps them, allowing for dynamic building of rows
  • Custom inspect for keyboard
  • Support for custom webhook paths in production deployments (default: "/telegram")
  • Improved Cast.cast with type checking in more types

[0.60.0]

  • Clean README.md and separate content in different guides in ./guides
  • Added :scopes and :lang options to the command macro ( #202 by @txssu )
  • Added ExGram.Dsl.MessageEntityBuilder to build messages with MessageEntity instead of markdown or html
  • If MDEx is installed as a dependency, a module ExGram.Markdown will be provided to transform from markdown to MessageEntities.
  • Improved ExGram.Dsl.Keyboard macros and helpers
  • Improved ExGram.Adapter.Test to enable actually real and useful tests
  • Added on_result DSL to "interject" the result of the previous enqueued action
  • Simplified the Macros.Helper, now it's easier to deal with params AST
  • Added parameters description to models and methods @doc field
  • Fix Tesla and Req adapters to return proper Telegram errors
  • Added the possibility to pass chat_id and message_id directly to delete and edit DSL helpers
  • Fix ignore username middleware not working when the message has a newline after the command "/command\nhey" (#200)
  • extract_info looks at phono's caption to check for commands/regex (#201)

[0.58.0]

  • Update to version 9.5
  • Added support to multiple return types on casting (fixes #196)
  • Implemented Subtype protocol to 10 generic types missing.
  • Added credo check to make sure new generic types don't miss the protocol implementation
  • Added support to media input files (fixes #195)
  • Add timeouts to Req adapter to handle longpolling correctly
  • Add missing types and updates on extract_user, extract_chat and extract_update_type

[0.57.0]

  • Update to Elixir 1.19 and Erlang 28.1.1
  • Update ex_doc dependency
  • Added CI
  • Added Req adapter

[0.56.1}

[0.56.0]

[0.55.1]

  • Fix: Only reload JSON engine of configuration is set

[0.55.0]

[0.54.0]

  • Add ExGram.Cast to convert responses to models
  • Fix webhook response casting, now all should be models
  • Fix webhook options allowed_updates when sending a multipart

[0.53.0]

[0.52.2]

[0.52.1]

  • Fix ChatBoostSource, MaybeInaccessibleMessage, MessageOrigin and ReactionType subtypes for decoding

[0.52.0]

  • DSL public method changes:

    • Deprecated extract_group, now it's called extract_chat
    • extract_update_type now returns {:ok, type} | :error instead of type | :error

    • extract_message_type now returns {:ok, type} | :error instead of type | :error

  • Fix decoding inner structs on messages

  • Remove maxwell

  • Remove inch_ex

  • Webhook url supports protocol and port

  • Add and apply styler

[0.51.1]

  • Fix #131. Now multi bots with the same module is possible.

[0.51.0]

  • Added options on polling and webhook methods. WARNING: If you use custom module for method updates, the initial parameters passed to the start_link/1 has changed. Before: {:bot, pid, :token, token} Now: %{bot: pid, token: token} + options configured on children setup

[0.50.2]

[0.50.1]

  • Fix timeout on different Tesla adapters

[0.50.0]

[0.41.0]

[0.40.0]

[0.34.0]

thumb fields renamed to thumbnail on models and methods.

[0.33.0]

[0.32.0]

  • Add test_environment config and build path accordingly

[0.31.0]

[0.30.0]

[0.29.0]

  • Add SendDocument response and answer_document DSL

[0.28.0]

[0.27.0]

[0.26.0]

  • Update Telegram API to 5.6

[0.25.0]

  • Update Telegram API to 5.4

[0.24.1]

  • Add original API descriptions to methods and models

[0.24.0]

  • Update Telegram API to 5.3
  • Breaking changes from the API:

Renamed method kickChatMember to banChatMember

Renamed method getChatMembersCount to getChatMemberCount

ChatMember now has specific subtypes (ChatMemberOwner, ChatMemberAdministrator, ChatMemberMember, ChatMemberRestricted, ChatMemberLeft, ChatMemberBanned)

BotCommandScope now has specific subtypes (BotCommandScopeDefault, BotCommandScopeAllPrivateChats, BotCommandScopeAllGroupChats, BotCommandScopeAllChatAdministrators, BotCommandScopeChat, BotCommandScopeChatAdministrators, BotCommandScopeChatMember)

[0.23.0]

  • Update Telegram API to 5.2

[0.22.0]

  • Update Telegram API to 5.1
  • Add credo and fix all the issues

[0.21.0]

  • Add {:file_content, "CONTENT", "filename.ext"} format on file fields to send content directly instead of using a file path

[0.20.0]

  • Big refactor fixing bugs on the process

[0.15.0]

  • Update Telegram API to 5.0
  • extractor.py now copy to clipboard the autogenerated text

[0.14.0]

  • Update Telegram API to 4.8

[0.13.0]

  • Use Supervisor.init instead of supervisor/1
  • Add "description" option to command macro
  • Add setup_commands option to use ExGram.Bot to send the commands at startup

[0.12.0]

  • Use new generator using a generic JSON

[0.11.0]

  • Update Telegram API to 4.7

[0.10.0]

  • Update Telegram API to 4.6

[0.9.0]

  • Warn when fetching token by bot's name and there are no token
  • Update Telegram API to 4.5

[0.8.1]

  • Add the ability to configure custom tesla middlewares
  • Fix regex macros, couldn't compile

[0.8.0]

  • Add Tesla adapter for HTTP and setting it as default
  • Add ability to select Tesla adapter (tested with hackney and gun)
  • Added documentation
  • Added template for creating a bot

[0.7.1]

  • Fix an error when not receiving updates the local update_id keeps increasing and makes an infinite loop of retrieving updates

[0.7.0]

  • Update to BOT API 4.4
  • Set a softer version in README

[0.6.2]

  • Update to BOT API 4.3

[0.6.1]

  • Update to BOT API 4.2
  • Add default handle_info handler and change timeout
  • Remove Supervisor.Spec uses, clean start_link and child_spec code

[0.6.0]

  • Handle when update_worker is nil and raise a better message
  • Add {:edited_message, msg} message
  • Relax hackney version
  • Allow to specify JSON engine to use config :ex_gram, json_encoder: Jason
  • Http implementation details moved from ExGram to ExGram.Adapter.Http