Skip to content

Latest commit

 

History

History
76 lines (51 loc) · 1.41 KB

File metadata and controls

76 lines (51 loc) · 1.41 KB

CLI Reference

Command-line interface documentation for Telegram Multi-Account Message Sender.

Running the Application

GUI Mode (Default)

python main.py

Or if installed via pip:

python -m app.cli

Command Line Options

The application primarily uses a GUI interface. For programmatic access, use the Python API.

Python API

Basic Usage

from app.services import initialize_database, get_settings
from app.models import Account, Campaign

# Initialize database
initialize_database()

# Get settings
settings = get_settings()

# Access models
accounts = Account.get_all()
campaigns = Campaign.get_all()

Environment Variables

Configure the application using environment variables:

export TELEGRAM_API_ID="your_api_id"
export TELEGRAM_API_HASH="your_api_hash"
export LOG_LEVEL="INFO"

Scripting Examples

Example: Send a Message

from app.core.engine import MessageEngine
from app.models import Account, Recipient

engine = MessageEngine()
account = Account.get_by_id(1)
recipient = Recipient.get_by_id(1)

engine.send_message(
    account=account,
    recipient=recipient,
    message="Hello, World!"
)

See Also