Menu

1 / 3

Build your Telegram bots in a Django way!

DEV Community: django·#!z@nko...;·14 days ago
#s5I1VLeJ
Long article (879 words) — no AI summary yet.
Reading 0:00
15s threshold

Hi guys! I hope you're doing well.

In this post I want to talk about my library, dj_telegram_bot . It helps you build Telegram bots right inside your Django project, and it feels like a normal Django app.

⭐ GitHub: zankoAn/dj_telegram_bot (a star helps a lot!)

📦 PyPI: dj-telegram-bot

📖 Docs: zankoan.github.io/dj_telegram_bot

Why I made it

Imagine you want to add a Telegram bot to your Django project. The first thing you do is look for an existing library and use it. But most of them don't fit well with Django, so you still have to take care of a lot of things yourself.

Here is what you get with dj_telegram_bot:

Decorator routing: commands, messages, buttons, inline queries and * wildcards. You can write functions or classes.

Built-in guards: @staff_required , @superuser_required , @sponsor_required (makes users join your channels first), and @before_handler for your own checks.

Edit from the admin: messages and keyboards live in the database.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.