a telegram anonymous bot with python programming language using:
- Telethon
- SQLAlchemy ORM
- SQLAlchemy repository pattern
at first, we need a telegram bot token we can create a bot in @BotFather and save token
# telethon configs
BOT_TOKEN=
YOUR_BOT_USERNAME=@your_username
API_ID=
API_KEY=
# proxy settings
PROXY_PROTOCOL=sock5
PROXY_HOST=localhost
PROXY_PORT=9050 #torproxy port for example
# mysql settings for example
MYSQL_HOST=localhost
MYSQL_PORT=3306
MYSQL_DATABASE=database
MYSQL_USER=user
MYSQL_PASSWORD=password
MYSQL_ROOT_PASSWORD=password
# PHPMYADMIN
PHPMYADMIN_PORT=81
python3.8 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python -m telegram_anonymous_bot
you can also run all staff you need with docker.
docker services:
- bot
- tor
- mysql
- phpmyadmin
- sqlpad
docker-compose up -d
phpmyadmin default port is 81 you can change it in .env sqlpad default port is 3000 .