I manage 30+ Telegram groups. I tried every bot framework. Nothing worked. So I built my own.
As the community grew, so did the noise. Spam attempts, job scams, crypto solicitations, cross-chat abuse. Manual moderation doesn’t scale — it creates latency, inconsistency, and burnout.
So I built a framework instead.
The answer was a pipeline. Every incoming message flows through a sequence of stages you define, executed in order. One chat or thirty — every message gets the same predictable treatment. No handler fires out of turn. No rule gets skipped.
Every stage has access to the full context — it knows exactly which chat it’s in, who sent the message. Stages can pass data to each other, dispatch actions like banning a user, terminate the pipeline early, or trigger hooks for logging and observability. The whole thing is observable, controllable, and composable.
Built this running 30+ groups. If you’re building on top of Telegram at scale — moderation, automation, workflow — this is the foundation I wish I had.
GitHub → https://github.com/anatolyben/Telegram-Automation-Framework
Top comments (0)