Coder Social home page Coder Social logo

telegram_base_bot's Introduction

Telegram Base Bot

MVC Architecture with Aiogram

Python aiogram

Overview

Telegram Base Bot is a foundational architectural skeleton for building Telegram bots using Python 3.11 and the Aiogram framework. This project follows the Model-View-Controller (MVC) design pattern, providing a structured and modular approach to developing feature-rich Telegram bots.

Features

  • MVC Architecture: Organize your bot's code in a clean and maintainable structure, separating concerns into models, views, and controllers.
  • Aiogram Framework: Leverage the power of Aiogram, a asynchronous Python framework for Telegram Bot API, to streamline bot development.
  • Modular Design: Easily extend and customize your bot by adding new features or modifying existing components without affecting the entire codebase.

Getting Started

Follow these steps to set up your Telegram Base Bot.

Clone the Repository:

git clone https://github.com/your_username/telegram_base_bot.git

Configure your Bot Token:

Create a new bot on Telegram and obtain the API token.

https://t.me/BotFather

To add the bot key to the .env file:

# bot api key
export BOT_TOKEN=''

Set environment variables:

source .env

Installation using venv

Install Dependencies:

pip install --upgrade -r requirements.txt

Run the Bot:

python run.py

Installation using Docker

Build and run the Docker Compose services:

docker-compose -f docker-compose.dev.yml up --build

Project Structure

telegram_base_bot/
│
├── src/
│   ├── __init__.py
│   ├── keyboards.py
|   ├── messages.py
|   ├── models.py
|   ├── views.py
│   └── ...
│
├── static/
│   └── ...
|
├── tests/
│   └── ...
|
├── .env
├── requirements.txt
├── Dockerfile
├── docker-compose.yml
├── run.py

License

This project is licensed under the MIT License

telegram_base_bot's People

Contributors

leon047 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.