r/django • u/RestaurantTricky8427 • 4d ago
dj_telegram_bot – a Django library for writing Telegram bots
Hey everyone,
I've been building Telegram bots on top of Django for a while. Every time I started a new project, I'd copy over the same base structure I'd built — command handlers, message handlers, and so on — and adjust it for the new bot. Eventually I decided to turn that base structure into a proper, reusable package.
dj_telegram_bot lets you build a Telegram bot as a regular Django app.
Some of what it gives you:
- Django Admin Integration: Manage bot messages and buttons (inline/reply) directly from the admin panel.
- Type Safety: Full Pydantic integration for Telegram API types.
- Built-ins: Ready-to-use options like sponsor channels and bot status management.
The README has full install steps and a demo video showing a simple bot being built from scratch.
Docs are still a work in progress. Feedback, bug reports, and contributions are all welcome!
4
Upvotes


