Legacy Telegram bot manager for registration, scheduled messaging, and database-backed search.
Security notice: this repository originally dates from 2018. A historical revision contained a Telegram bot token and the repository also tracked a local SQLite database. Rotate the historical bot token before reuse and do not commit user/chat databases.
Copy the example configuration for local development:
cp .env.example .envProvide these values through your runtime environment:
TELEGRAM_BOT_TOKEN
DB_NAME
DB_USER
DB_PASSWORD
DB_HOST
DB_PORT
The active SQL-backed implementation is core/chatapp.py.
- Telegram and database credentials are loaded from environment variables.
- Database search input uses parameterized SQL.
- Dynamic profile-field updates are limited to an explicit allow-list.
- Message delivery retries are bounded.
- Registration logging avoids printing names and Telegram IDs.
- Local databases, generated CSV user lists, and environment files are ignored by Git.
See SECURITY.md before deployment.
The project currently uses an old python-telegram-bot API and an obsolete Python runtime declaration. A separate modernization pass is recommended before production deployment.
The bot provides:
- User registration.
- Scheduled Telegram messages.
- Database-backed keyword search.
- Group/private chat list management.
The original API examples remain available in the Git history for reference.