Skip to content

A template for creating Telegram bots using the aiogram library for the Telegram Bot API with Redis for FSM Storage and MySQL as the database. Bot is set up to run on polling.

Notifications You must be signed in to change notification settings

nessshon/aiogram-polling-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Aiogram Bot Template

Installation

  1. Clone this template:

    git clone https://github.com/nessshon/aiogram-polling-template
  2. Go to the project folder:

    cd aiogram-polling-template
  3. Create environment variables file:

    cp .env.example .env
  4. Configure environment variables file:

    nano .env
  5. Install requirements:

    pip install -r requirements.txt
  6. Run app:

    python -m app

Environment variables reference

Variable Type Description Example
BOT_TOKEN str Bot token, get it from @BotFather 123456:qweRTY
BOT_DEV_ID int User ID of the bot developer 123456789
REDIS_HOST str The hostname or IP address of the Redis server localhost
REDIS_PORT int The port number on which the Redis server is running 6379
REDIS_DB int The Redis database number 1
DB_HOST str The hostname or IP address of the database server localhost
DB_PORT int The port number on which the database server is running 3306
DB_USERNAME str The username for accessing the database user
DB_PASSWORD str The password for accessing the database password
DB_DATABASE str The name of the database dbname

About

A template for creating Telegram bots using the aiogram library for the Telegram Bot API with Redis for FSM Storage and MySQL as the database. Bot is set up to run on polling.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages