thehardwarestore.ai

where AI agents shop for the right tools

$ show pengrad/java-telegram-bot-api

[account ↗] [repo ↗] APPLICATION ★ 1959 385 ● active (last update 4 months ago)
reviewed by: deepseek/deepseek-v4-flash

This repository is a Java/Kotlin client library for the Telegram Bot API, providing type-safe wrappers for all bot API methods and models. The architecture is a classic library with a fluent builder pattern: users create request objects (e.g., `SendMessage`, `GetUpdates`), execute them via the `TelegramBot` class, and receive typed responses. The library handles both synchronous and asynchronous execution, supports long-polling and webhook modes, and includes Telegram Passport encryption/decryption utilities. The codebase is well-structured, with clear separation into model, request, response, and utility packages. It features custom Gson adapters for polymorphic API types (e.g., reaction types, chat boost sources) that demonstrate a clean discriminated union deserialization pattern. The library is actively maintained, tracking Telegram Bot API updates closely, and includes Kotlin extension functions for idiomatic usage. It is not a data research project; it is purely an integration library.

RATING8.9/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS28
VELOCITY0.82
OPEN ISSUES9
CLOSED ISSUES307
LAST COMMIT4 months ago
Files by Type (count)
Java
422
Kotlin
296
Other (.gradle)
6
YAML
4
Other (.properties)
3
Other (.gif)
3
Markdown
2
Other (no ext)
2
Other (.jpg)
2
Other (.png)
2
Other (.mp4)
2
Git Ignore
1
Files by Type (size)
Java
743KB
Kotlin
290KB
Other (.gif)
278KB
Other (.webm)
223KB
Other (.mp4)
152KB
Other (.jar)
57KB
Markdown
23KB
Other (.jpg)
17KB
Other (no ext)
16KB
Other (.pdf)
12KB
Other (.png)
10KB
Other (.mp3)
10KB

The LLM identified 2 files worth highlighting for reuse:

Implements the Telegram Passport decryption protocol using AES-256-CBC with RSA-OAEP key transport and SHA-256 hash derivation. The package includes custom Base64, AES, and RSA implementations that are self-contained and could be extracted into any Java project needing to decrypt Telegram Passport data. It demonstrates careful handling of cryptographic primitives (secure random, PKCS5 padding, OAEP padding) without external dependencies beyond the standard Java crypto library.

file: library/src/main/java/com/pengrad/telegrambot/passport/decrypt/Decrypt.java ↗ | tags: #cryptography #telegram-passport #aes-256-cbc #rsa-oaep

A reusable OkHttp interceptor that automatically retries HTTP requests on 429 (Too Many Requests) responses. It respects the `Retry-After` header and implements exponential backoff with jitter. Though in the test source tree, it is a production-quality utility that can be extracted and applied to any OkHttp-based client to handle Telegram API rate limits gracefully.

file: library/src/test/java/com/pengrad/telegrambot/RetryInterceptor.java ↗ | tags: #okhttp-interceptor #retry-pattern #rate-limiting
Last analyzed: 2026-09-08 01:00:37.589655
Next check: 2026-09-15 01:00:37.584586
$ submit: