johnspade / telegramium

Telegramium or F[ Tg ] - pure functional Telegram Bot API implementation for Scala.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

F[Tg] - Telegramium

Telegram

F[Tg] is a pure functional Telegram Bot API for scala.

This project is a try to provide a comprehensive, well documented and Scala-idiomatic client/server implementations to work with Telegram Bot API. Please refer to telegramium-examples module for usage examples. There is a support both for polling and webhooks. API core is generated from the official documentation, so it is believed to cover all the available methods, entities and to be up to date.

Currently the following backends are supported:

  • http4s
  • cats-effect
  • circe
  • uPickle (MsgPack binary serialization, to be used for storing API messages in DB and sending over network)

You may want to start with Api.scala and EchoBot.scala.

How to use

Create the dependency by adding the following lines to your build.sbt:

libraryDependencies += "io.github.apimorphism" %% "telegramium-core" % "1.49.0"
libraryDependencies += "io.github.apimorphism" %% "telegramium-high" % "1.49.0"

Versioning

X.Y.Z where

  • X major changes to telegramium high or internals of the core.
  • Y denotes Telegram Bot API version which is supported by this X.Y.Z.
  • Z bug fix changes.

Please, note, that this versioning scheme is started from version 1.48.0.

Known issues

InlineQueryResultMpeg4Gif and InlineQueryResultCachedMpeg4Gif has the same discriminator value which comes from the official docs. Maybe the bug in Tg Bot API itself.

Contribution

I'd love to have more testing and more example bots. Ideas and PRs on telegramium-high - high level interface for the bot API are also highly encouraged.

If you want to change something in telegramium-core or found a bug in it, please create an issue. Do not create pull requests with changes on telegramium-core as we use semi-automatic way to work with it. Except that any PR-s are welcome.

Alternatives

You may also want to have a look at these projects:

Known usages

Note for Yan

Yan, напиши бота.

About

Telegramium or F[ Tg ] - pure functional Telegram Bot API implementation for Scala.

License:MIT License


Languages

Language:Scala 100.0%