MilMit Telegram Audience Manager

Version: 1.0.0 · Developer / Publisher: MilMit · Website: milmit.net · License: Commercial

Overview

MilMit Telegram Audience Manager is a Telegram audience, campaign and automation management system. It provides user management, audience segmentation, forced membership, queued and scheduled campaigns, media delivery, automation, analytics, referrals, rewards, privacy tools and operational diagnostics.

Requirements

ComponentRequirement
PHP8.1 or newer
ExtensionscURL, JSON, PDO + PDO_SQLite or PDO_MySQL
RecommendedZipArchive for backup/update operations
TelegramBot token and numeric Owner Telegram ID

Installation

  1. Extract the ZIP on your web server.
  2. Open /install/.
  3. Enter the Bot Token, Owner Telegram ID and SQLite/MySQL settings.
  4. The installer creates .env, runs the idempotent migration and locks the installer.
  5. Configure the Telegram webhook to the public URL of index.php and use the generated WEBHOOK_SECRET as Telegram's secret token.
  6. Add the Worker Cron shown below.
  7. Send /admin to the bot as the Owner.
* * * * * /usr/bin/php /path/to/support/scripts/worker.php >/dev/null 2>&1
Do not delete an existing .env or persistent data during an update.

Main features

Administration

Use /admin to open the management dashboard. Useful commands include:

/tag add vip
/tag user TELEGRAM_ID vip
/adminadd TELEGRAM_ID operator
/campaign pause ID
/campaign resume ID
/campaign cancel ID
/maintenance on MESSAGE
/maintenance off
/export
/diagnostics
/privacy export USER_ID
/privacy erase USER_ID
/dlq list
/creator

Audience filter example:

tag=vip;active=7;lang=en;phone=1;member=1

Use all to target all eligible non-blocked users.

Broadcasts and media

The campaign flow accepts Telegram content that can be copied by the Bot API, including text and common media types. Heavy delivery is handled by the Worker instead of blocking the webhook. Telegram bots do not provide a general message “seen” receipt; analytics therefore records supported delivery outcomes, callbacks and tracked clicks.

Forced membership

Add required channels from the admin membership section. The bot must have sufficient access to call getChatMember. Private channels should use a numeric chat ID and a valid invite URL.

Database and migration

SQLite is the default. MySQL can be selected during installation. Run php scripts/migrate.php when required. Migrations are designed to be repeatable and preserve customer data.

Maintenance and diagnostics

php scripts/health.php
php scripts/diagnostics.php
php tests/run.php

For restore:

php scripts/restore.php /path/to/backup.zip --confirm

For a safe update:

php scripts/update.php /path/to/release.zip

The updater creates a pre-update backup and does not import a release .env.

Security notes

Plugin SDK

Developer extension information is available in docs/PLUGIN-SDK.md. Modules should extend functionality without modifying the core webhook flow.

Troubleshooting

If /admin does not open, verify the configured admin IDs. If campaigns remain queued, verify Cron and run the Worker manually. If membership checks fail, verify the bot's channel access. Use the diagnostics command/script for database, extension, queue and webhook status.