bot4s/telegram
46.5
Weak · 6 November 2026
12.6k
lines of production code
Scala
with JavaScript
4
measurements over time
What this system is
This system is a Scala library for building Telegram bots, supporting both JVM and Scala.js platforms. It provides a declarative API for handling messages, commands, and callbacks, backed by the sttp HTTP client and various effect systems like Cats Effect, ZIO, and Monix. The library includes comprehensive examples demonstrating integration with different actor systems and web servers, along with extensive test coverage for API interactions and data marshalling.
How it got here
2015–2018 — Mill migration and Scala.js support
7 changes.
The project migrated its build system to Mill 1.1.7 and added Scala.js support, enabling cross-platform compilation alongside existing JVM targets. This period also introduced a declarative bot API built on sttp 4, expanded Telegram Bot API method coverage, and included comprehensive test suites for marshalling and command handling.
2019–2025 — Pekko migration and sttp 4 update
8 changes.
The project migrated its core actor system from Akka to Apache Pekko and upgraded the HTTP client library to sttp 4. This period also involved adding comprehensive test coverage for the new Pekko HTTP marshalling and error handling, alongside providing new example bots for various effect systems like Cats Effect, Monix, and ZIO.
Features
Add 2048 game example with Telegram integration
The examples/resources directory now includes a complete, self-contained implementation of the 2048 game. This addition provides the necessary HTML, CSS, and JavaScript assets to run the game, including specific integrations for Telegram Games via the TelegramGameProxy and a custom API layer for score management. The package also includes a logback configuration for logging and SSL placeholder resources to support secure hosting contexts.
examples/resources · 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, Launcher.scala) demonstrate how to build a Telegram bot using the Monix effect system and sttp 4. The EchoBot class extends TelegramBot with Polling\[Task\] and uses sttp.client4.Backend\[Task\] for HTTP requests, while the Launcher object provides a TaskApp entry point that initializes an HttpClientMonixBackend and runs the bot.
examples/src-monix · high confidence
Add ZIO-based Telegram bot examples
New example files in the ZIO module demonstrate how to build Telegram bots using the ZIO runtime and sttp 4. The set includes an EchoBot for basic message handling, a CommandsBot showcasing command and regex command patterns, a CommandsWebhookBot illustrating webhook integration with a custom ZIO HTTP server, and a Launcher entry point to run these examples.
examples/src-zio · high confidence
Added Cats Effect 3 example bots
New example implementations (CommandsBot, EchoBot, and Launcher) have been added to the examples/src-cats3 directory, demonstrating how to build Telegram bots using the Cats Effect 3 ecosystem and sttp client 4.
examples/src-cats3 · high confidence
Expanded Telegram Bot API method coverage and platform-specific file handling
This release adds support for numerous new Telegram Bot API methods, including invoice and payment operations (CreateInvoiceLink, SendInvoice), sticker management (AddStickerToSet, CreateNewStickerSet, GetCustomEmojiStickers), forum features (GetForumTopicIconStickers), and bot profile management (GetMyDescription, GetMyName, GetMyShortDescription, GetMyDefaultAdministratorRights). It also introduces platform-specific file handling: the InputFile model now supports filesystem paths on the JVM while restricting Scala.js builds to file IDs and in-memory contents, and provides a new cats-effect-based Polling implementation to replace the previous Future-based approach.
repository · high confidence
Migration to Mill 1.1.7 and addition of Scala.js support
The project has migrated its build system to Mill version 1.1.7, replacing the previous build configuration. Additionally, the core library now supports Scala.js, allowing the library to be published and used in Scala.js projects alongside the existing JVM targets (Scala 2.12, 2.13, and 3).
(repo-wide) · high confidence
New JVM-2 examples using Pekko and sttp 4
The examples in the src-jvm-2 directory have been added to demonstrate the library's migration from Akka to Pekko and from sttp 3 to sttp 4. These new Scala files showcase updated bot implementations, including a Doge bot, a Let-Me-Google-That-For-You bot, and several game and webhook examples, all utilizing the new Pekko HTTP server, Pekko-based HTTP clients, and the sttp 4 backend.
examples/src-jvm-2 · high confidence
New example bots and platform-specific launchers
The examples directory now includes a comprehensive set of demonstration bots (Echo, Commands, Markdown, Poll, Poker, SelfDestruct, etc.) showcasing various Telegram Bot API features, along with dedicated launcher and backend configuration files for both JVM (using OkHttp) and JavaScript (using Fetch) environments to run these examples on different platforms.
examples/src · high confidence
Behavioural changes
Migrate HTTP client to sttp 4 and introduce a declarative bot API
The core library replaces the previous HTTP client with sttp 4, providing platform-specific implementations for the JVM and Scala.js to handle API requests and file uploads. Alongside this infrastructure change, a new declarative API is introduced, allowing developers to define bot behavior using intuitive methods like onMessage, onCommand, and onCallbackQuery instead of manually handling raw update dispatching. This update also includes helper traits for chat actions, regex-based command filtering, and improved logging support across platforms.
core · high confidence
Migrate from Akka to Apache Pekko
The library has switched its underlying actor system from Akka to Apache Pekko. This change updates the core API implementation, including the actor broker, HTTP client, and web route handlers, to use the \org.apache.pekko\ package namespace. Users relying on the previous Akka-based implementation will need to update their dependencies and imports to use the new Pekko-based artifacts.
pekko · 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 cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 47 → 46 (-0.4)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 76 → 76 (+0.0)
- Architecture 87 → 85 (-1.7)
- Maturity 55 → 54 (-1.2)
- Readiness 28 → 28 (+0.0)
- Security 58 → 58 (+0.0)
- Performance 100 → 100 (+0.0)
Resolved (2)
- Documentation: no architecture or design documentation (README.md)
- Off-boarding risk: anonymized user #1
New (1)
- Off-boarding risk: anonymized user #1
Architecture
- Unchanged — 0 containers · 1 contexts · 0 edges
Written by cca.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 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 07e15ea01caa3d09d4c6d93af8efe8ed7b9307ef — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-60d1b390edf0.