View Source Tgex

Tgex is a library for building Telegram bots in Elixir.

Installation

If available in Hex, the package can be installed by adding tgex to your list of dependencies in mix.exs:

def deps do
  [
    {:tgex, "~> 0.0.1"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/tgex.

Usage

Motivation

Some of the Telegram bots are a great example of stateful applications. Each chat is a state, where user can interact with own instance of the bot.

Default way to build sequential stateful bots is scenes or conversation patterns.

Tgex is a library that allows you to build sequential stateful bots in a more functional way. I did an POC using Gleam and it worked great. So I decided to implement it in Elixir.

Currently I don't have any plans to cover all the features of the Telegram API, but I'm open to suggestions and contributions.