bot4s/telegram
44.2
Weak · 20 September 2026
12.5k
lines of production code
Scala
with JavaScript
1
measurement over time
What this system is
This system is a Scala library for building Telegram bots, providing a core API client that supports multiple effect systems including Cats Effect, ZIO, and Monix. It offers modular implementations for handling bot interactions via polling or webhooks, with specific support for Apache Pekko as the actor and HTTP infrastructure. The library includes comprehensive examples demonstrating various bot patterns, such as command handling, inline queries, and Mini Apps, alongside robust testing for API marshalling and error handling.
How it got here
2015–2018 — Core library foundation and modernization
7 changes.
This period established the foundational Telegram Bot API client library, introducing a declarative command-handling interface and comprehensive test coverage for core components. The architecture was significantly modernized by migrating to a Cats-effect based design with sttp 4, enabling flexible effect type support and replacing legacy HTTP clients. Additionally, the build system was standardized using Mill, and the project expanded its utility with new example bots and a Telegram Mini App game implementation.
2019–2025 — Pekko migration and effect system examples
8 changes.
The project migrated its actor infrastructure from Akka to Apache Pekko, introducing a new Pekko-based implementation for the Telegram Bot API. Concurrently, it expanded its example suite to demonstrate integration with various functional effect systems, including Cats Effect, Monix, and ZIO, while adopting sttp 4 for HTTP communication.
Features
Add 2048 Telegram Mini Game example with logging configuration
The examples/resources area now includes a complete, self-contained implementation of the 2048 game designed for Telegram Mini Apps. This addition provides the necessary HTML, CSS, and JavaScript assets (including polyfills for older browsers and a Telegram-specific API wrapper) to run the game within the Telegram ecosystem. It also introduces a logback.xml configuration file to enable trace-level console logging for the example, and a placeholder file for SSL resources.
examples/resources · high confidence
Add Cats Effect 3 example bots
New example implementations for the Telegram bot library using Cats Effect 3 are now available in the examples directory. This includes an EchoBot that reverses received messages and a CommandsBot demonstrating various command handling patterns (string commands, regex commands, argument parsing, and conditional execution), along with a launcher to run these examples.
examples/src-cats3 · high confidence
Add Cats-effect based Telegram bot examples
New example bots (EchoBot, CommandsBot) and a launcher are added to the examples/src-cats directory, demonstrating how to build Telegram bots using the Cats-effect ecosystem (Concurrent, Timer, ContextShift) and sttp client 4 for HTTP backends.
examples/src-cats · high confidence
Add Monix-based Telegram bot examples using sttp 4
New example files (EchoBot.scala and Launcher.scala) have been added to the examples/src-monix directory, demonstrating how to build a Telegram bot using the Monix effect system. These examples integrate with the cats-friendly core implementation and utilize sttp 4 (specifically HttpClientMonixBackend) for HTTP communication, replacing previous Future-based approaches.
examples/src-monix · high confidence
Add Pekko-based Telegram Bot implementation
This change introduces a new implementation of the Telegram Bot API client and actor system using Apache Pekko instead of the previous Akka-based stack. The \pekko\ module provides \PekkoTelegramBot\ as the main entry point, along with \ActorBroker\ for handling updates via actors, \WebRoutes\ for hosting HTTP servers (including HTTPS support), and \Webhook\ for receiving updates via webhook URLs. It also includes \PekkoHttpClient\ and \YetAnotherPekkoClient\ for making API requests using Pekko HTTP, and \PekkoHttpMarshalling\ to handle JSON and multipart serialization/deserialization compatible with Pekko's streaming and HTTP models.
pekko · high confidence
Add ZIO-based Telegram bot examples
New example implementations for the Telegram bot library using the ZIO effect system are now available in the examples directory. These include an EchoBot that reverses incoming text, a CommandsBot demonstrating various command handling patterns (including regex commands and argument parsing), and a CommandsWebhookBot showcasing integration with ZIO HTTP for webhook-based updates. The examples utilize sttp client 4 for HTTP backends and zio-http for the webhook server component.
examples/src-zio · high confidence
Initial release of the Telegram Bot API client library
This entry introduces the core library for building Telegram bots, providing a comprehensive set of API method implementations (such as sending messages, managing chats, and handling payments) and a declarative command-handling interface. It includes a \cats\-based polling mechanism for receiving updates and defines a specific \TelegramApiException\ for handling API errors, establishing the foundational behavior for bot interactions.
repository · high confidence
New JVM 2.13 example bots using Pekko and sttp 4
The \examples/src-jvm-2\ directory now contains a complete set of example Telegram bots rewritten for the JVM 2.13 target. These examples migrate the underlying HTTP and actor infrastructure from Akka to Apache Pekko and adopt the sttp 4 client library. The collection includes diverse implementations such as a Doge image bot, a Let-Me-Google-That-For-You bot with inline queries, QR code generation, text-to-speech, and several 2048 game bots (self-hosted and GitHub-hosted) that demonstrate the \GameManager\ API. Additional examples showcase advanced patterns like per-chat actor state management, SOCKS proxy support, webhook handling with SSL certificates, and running polling alongside custom web routes.
examples/src-jvm-2 · high confidence
New example bots for Telegram Bot API v6.6, v6.7, and authentication
Added new example bots demonstrating Telegram Bot API v6.6 features (sticker set management, short descriptions), API v6.7 features (bot name management), and a simple authentication pattern. The Api66Bot showcases creating and managing sticker sets, while Api67Bot demonstrates setting and getting bot names. AuthenticationBot provides a basic login/logout mechanism for restricting access to specific commands.
examples/src · high confidence
Behavioural changes
Core library refactored to use Cats and sttp 4
The core library has been migrated from Scala 2.12/2.13 with Scalaj-http and standard Futures to a Cats-effect based architecture using sttp 4. This change replaces the previous HTTP client implementation with a generic \SttpClient\ that supports any \Backend\[F\]\, allowing users to choose their preferred effect type (e.g., \Future\, \IO\, etc.) rather than being locked into \scala.concurrent.Future\. The \RequestHandler\ abstract class now relies on \cats.MonadError\ for error handling and request execution, and the \TelegramBot\ class requires an explicit \Backend\[F\]\ instance. Additionally, the \ScalajHttpClient\ has been removed in favor of the new sttp-based client, and the declarative API traits (\BotBase\, \Polling\, etc.) have been updated to work with the generic effect type \F\[\_\]\.
core · high confidence
Migration to Mill build tool and Apache 2.0 license
The project has switched its build system from sbt to Mill (version 1.1.7), introducing a new \build.mill\ configuration, a \mill\ launcher script, and a \.mill-version\ file. The build now supports cross-compilation for Scala 2.12, 2.13, and 3.3.8, and publishes artifacts as \telegram-core\ and \telegram-pekko\ to Maven Central. Additionally, the project license has been updated to Apache 2.0, and the \.gitignore\ file has been updated to exclude Mill-specific build artifacts.
(repo-wide) · high confidence
Test coverage
Added marshalling tests for Telegram API models; Added test suite for Telegram API command and message handling; Added tests for Pekko HTTP marshalling; Added tests for SttpClient error handling.
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 44.
Lenses
- Code Health 100
- Architecture 94
- Maturity 55
- Readiness 21
- Security 57
Changes since last survey
- 300 commits — 279 feature/other, 21 fixes
By area
- (root) — 216 commits
- core/src — 42 commits
- .github/workflows — 30 commits
- (repo) — 3 commits
- examples/src-jvm-2 — 2 commits
- examples/src-zio — 2 commits
- akka/src — 1 commit
- core/test — 1 commit
- examples/src — 1 commit
- examples/src-cats3 — 1 commit
- examples/src-jvm — 1 commit
Notable commits
- fix: CopyMessage returns MessageId, fixes #410 (#411)
- fix: Fix Maven badge link in README
- fix: Fix Mill link (#198)
- fix: Fix scaladoc for KeyboardButton shortcuts (#210)
- fix: Fix warnings for both 2.12 and 2.13 (#114)
- fix: [fix][scala2.13] Convert map view to map in STTP send (#117)
- fix: chore: fix publish snapshot
- fix: chore: fix release pipeline memory (#515)
- fix: fix(build): include example src-jvm2 (#518)
- fix: fix(core): Get rid of redundant logback dependency (#398)
- fix: fix: Allow at most one in Update
- fix: fix: CI and release
- fix: fix: Exactly one of the optional fields must be used to specify type of the button.
- fix: fix: Handle EditMessageMedia request (#331)
- fix: fix: ci for release (#499)
- fix: fix: convert iconCustomEmojiId to Option[String] (#461)
- fix: fix: publish snapshot (#494)
- fix: fix: publishing script
- fix: fix: release ci
- fix: fix: snapshot version (#495)
- …and 280 more
Architecture
- 0 containers · 1 bounded contexts · 0 dependency edges (baseline)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
bot4s/telegram was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 20 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 644287a96ce9816409fec3c5aa2715993e918f2d — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-b51f968c9b10.