Examples And Learning Paths
View SourceNadia has two layers that can be used together or separately:
Nadiaexposes the complete Telegram Bot API as direct Elixir functions.Nadia.Context,Nadia.Dispatcher,Nadia.Polling,Nadia.Webhook, andNadia.SessionStoreprovide small building blocks for receiving updates in an OTP application.
Start with the path that matches what you are building.
First Bot
| Goal | Guide | Main modules |
|---|---|---|
| Generate and run an echo bot | Build Your First Bot | Mix.Tasks.Nadia.Gen.Bot, Nadia.Polling |
| Route commands and inline buttons | Commands And Inline Keyboards | Nadia.Dispatcher, Nadia.Context |
| Collect data over several messages | Conversation State | Nadia.SessionStore |
| Persist conversation state | Persistent Session Backends | Nadia.SessionStore |
The complete handler source for the interactive examples lives in the
examples directory and
is shipped as uncompiled source. Copy and rename an example under your
application's lib/ directory. Nadia's normal offline test suite loads and
exercises every published example directly.
Integrate And Test
| Goal | Guide | Main modules |
|---|---|---|
| Receive updates over HTTP | Receive Webhook Updates | Nadia.Webhook |
| Run several bot identities | Run Multiple Bots | Nadia.Client, Nadia.Polling |
| Test without credentials or network calls | Test Bot Handlers | Nadia.Client, Nadia.HTTPClient |
| Typed media, stories, uploads, and downloads | Media And Files | Nadia.InputMedia, Nadia.InputPaidMedia, Nadia.InputPollMedia, Nadia.InputFile |
| Rich formatting and clickable story areas | Rich Messages And Stories | Nadia.InputRichMessage, Nadia.StoryArea |
| Handle Telegram errors with bounds | Errors And Rate Limits | Nadia.Model.Error, Nadia.Model.ResponseParameters |
| Publish Telegraph pages | Use The Telegraph API | Nadia.Graph |
Prepare For Production
Read the Production Checklist before deploying. It covers polling versus webhooks, duplicate delivery, handler return values, state persistence, secrets, timeouts, and operational visibility.
For individual Bot API calls and model fields, use the Nadia module reference
alongside the official Telegram Bot API documentation.
The examples focus on application mechanics rather than repeating one example
for each Telegram method.