Django Telegram Bot

screenshot of Django Telegram Bot
django

My sexy Django + python-telegram-bot + Celery + Redis + Postgres + Dokku + GitHub Actions template

Overview

The django-telegram-bot template is a production-ready Telegram bot built using Django, python-telegram-bot, Celery, Redis, Postgres, Dokku, and GitHub Actions. It provides a database, admin panel, and a range of useful built-in methods. The template allows users to decide between Postgres, Sqlite3, or MySQL for the database, and offers features such as background jobs using Celery, Telegram API usage in polling or webhook mode, exporting user information to .csv, and native telegram commands in the menu.

Features

  • Database: Users can choose between Postgres, Sqlite3, or MySQL for the bot's database.
  • Admin Panel: The template includes an admin panel thanks to Django, allowing easy management of the bot.
  • Background Jobs: Celery is used for running background jobs, adding flexibility and scalability to the bot.
  • Production-ready deployment: The template is designed for production deployment using Dokku, a PaaS that builds the app from sources and deploys it with zero downtime.
  • Telegram API usage: The bot can be configured to use either polling or webhook mode to interact with the Telegram API.
  • Export User Information: Users have the option to export all user information to a .csv file.
  • Native Telegram Commands: Native Telegram commands are available in the bot's menu, and can be easily edited or deleted using the set_my_commands bot's method.
django
Django

Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. It follows the model-view-controller (MVC) architectural pattern, providing an extensive set of built-in tools and conventions to streamline the creation of robust and scalable web applications.