Skip to content

TeleFlow Documentation

TeleFlow is a Telegram bot framework for .NET that keeps the first handler simple and the grown application explicit.

The core idea is direct: your bot should not become a black box just because the framework is convenient. TeleFlow keeps handler code close to normal C#, uses normal dependency injection, exposes the Telegram client directly, and moves handler metadata generation to build time on the recommended path.

Start Here

Learning Paths

First Bot

For trainees and juniors who want to get something working without being buried in infrastructure:

  1. Quickstart
  2. Configuration and secrets
  3. Handlers and routing
  4. Callbacks and keyboards
  5. State and wizard
  6. Support desk tutorial

Production Bot

For developers who already understand .NET services and want correct project shape:

  1. Application model
  2. Configuration and secrets
  3. Project structure
  4. Dependency injection
  5. Telegram client and schema
  6. Errors and diagnostics
  7. Testing

Enterprise Bot

For teams that care about predictable runtime behavior, ownership boundaries, deployment, and future maintenance:

  1. Enterprise guide
  2. Deployment
  3. Performance and scaling
  4. Versioning and releases
  5. Production checklist
  6. Architecture notes
  7. Generated registration
  8. Custom storage

Documentation Map

Getting Started

Tutorials

Fundamentals

Features

Transports

Advanced

Enterprise

Reference

Planning

Philosophy

TeleFlow exists for the moment when a simple Telegram bot becomes an application.

It should remain easy to start:

  • one console app;
  • one command handler;
  • one token;
  • one long polling transport.

It should also remain honest when the project grows:

  • no hidden reflection fallback on the recommended registration path;
  • no requirement to wrap every Telegram call in a framework abstraction;
  • no special service container;
  • no fake enterprise story based only on naming.

The design preference is simple: explicit behavior, predictable runtime, small public contracts, and extension points only where replacement is a real use case.

Current Scope

The current repository includes:

  • Telegram Bot API client and generated schema models;
  • generated client method extension methods;
  • handler framework for messages, callbacks, and chat member updates;
  • command, text, template, regex, media, callback, state, scene, role, and custom filter attributes;
  • typed callback payloads through [CallbackData] and [Callback<TPayload>];
  • inline keyboards, reply keyboards, keyboard removal, force reply, and chat actions;
  • state, state data, wizard navigation, and memory storage;
  • long polling and ASP.NET Core webhook adapters;
  • raw long polling and raw webhook packages;
  • generated handler registration, explicit direct registration, and explicit reflection registration;
  • middleware, update processor, update source, dispatcher, storage, callback serializer, and client replacement points.