Skip to content

Mailing telegram bot can send any message you want to many users you want.

Notifications You must be signed in to change notification settings

andrey-backend-dev/mailing_telegram_bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MAILING TELEGRAM BOT

Getting started:

  1. First of all, you need to get token from BotFather.

  2. Then create a .env file and put there TOKEN, NAME, PASSWORD and PINCODE, where
    NAME is a username from your "mysql database", PASSWORD is a password from your "mysql database" and PINCODE is a pin code for giving rights to an user for mailing.

Format of writing:

TOKEN=tokenname
NAME=name
PASSWORD=hardpass
PINCODE=hardpincode

If you don't know what means a username and password from "mysql database", I recommend you to read this article

  1. Now, you need to install requirements.
pip install -r requirements.txt
  1. Run the script named as "database.py". It will create a database for the Telegram bot.
python3 database.py
  1. Run the script named as "main.py". This is the main script which starts the telegram bot.
python3 main.py

Gratz!
Your bot is working.

Working with Database:

If you need to refresh your database, you can repeat previous actions like just run the database.py script.

About

Mailing telegram bot can send any message you want to many users you want.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages