All notable changes to this project will be documented in this file.
[Unreleased]
Added
- Bot DSL — declarative
commandandonmacros for routing updates without manual pattern matching allowmacro for compile-time access control (literal IDs or{:config, key})extract_chat_id/1andparse_command/1public helpers onHotline.Bot- DSL bot example (
examples/dsl_bot.exs) - Comprehensive Bot DSL test suite (
test/hotline/bot_test.exs)
Changed
handle_update/2is now an optional callback — DSL bots don't need itinit_bot/1call usesapply/3to avoid compile-time resolution errors- Compile-time
allowIDs merge with runtimeallowed_idsoption - Hybrid bots (DSL + manual
handle_update/2) dispatch DSL first, then fall back viasuper
Fixed
Hotline.Type— extractedapply_nested/3to eliminateMap.gettype warnings on modules without nested types (User, Chat)Hotline.Flow— skip generating defaulton_done/1/on_cancel/1when user already defines them, eliminating redundant clause warnings
[0.1.0] - 2026-03-19
Added
- Core Telegram Bot API client (
Hotline.Client) with JSON and multipart support - Type system with
use Hotline.Typemacro and automatic nested parsing - Seed types:
User,Chat,Message,CallbackQuery,Update - Cascading config resolution (opts > app env > system env > defaults)
- Structured error types with
retry_afterextraction - Long-polling via
Hotline.Pollerwith 409/429 handling - Webhook support via
Hotline.WebhookPlug with secret token verification Hotline.Webhook.Routerfor standalone Bandit deployment- Bot behaviour (
use Hotline.Bot) with PubSub-driven update handling allowed_idsoption to restrict bots to specific Telegram user IDs- Lazy
Hotline.Streamfor IEx exploration - Optional
Hotline.BroadwayProducerfor pipeline processing - Top-level API:
get_me,send_message,send_photo,send_document,answer_callback_query,edit_message_text,delete_message,set_webhook,delete_webhook - Code generator (
mix hotline.gen) fetching from official Bot API spec - Telemetry events for requests and received updates
- MIME type detection with optional
MIMElibrary fallback - Retry support via Req (
:transient, max 3 retries)