Metadata-Version: 2.4
Name: elizaos-plugin-telegram
Version: 2.0.0a5
Summary: Telegram plugin for elizaOS - Python implementation for bot integration
Project-URL: Homepage, https://github.com/elizaos/eliza
Project-URL: Documentation, https://elizaos.ai/docs
Project-URL: Repository, https://github.com/elizaos/eliza
Author: elizaOS Contributors
License-Expression: MIT
Keywords: agents,ai,bot,chat,elizaos,telegram
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Communications :: Chat
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: httpx>=0.28.0
Requires-Dist: pydantic>=2.10.0
Requires-Dist: python-telegram-bot>=21.0.0
Provides-Extra: dev
Requires-Dist: mypy>=1.14.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24.0; extra == 'dev'
Requires-Dist: pytest-cov>=6.0.0; extra == 'dev'
Requires-Dist: pytest-xprocess>=1.0.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: python-dotenv>=1.0.0; extra == 'dev'
Requires-Dist: ruff>=0.8.0; extra == 'dev'
Description-Content-Type: text/markdown

# elizaOS Telegram Plugin (Python)

Telegram bot integration for elizaOS agents.

## Features

- Telegram bot message handling
- Support for private chats, groups, and supergroups
- Forum topic support for supergroups
- Entity synchronization
- Reaction handling
- Button support (login and URL buttons)

## Installation

```bash
pip install elizaos-plugin-telegram
```

## Configuration

The plugin requires the following environment variables:

- `TELEGRAM_BOT_TOKEN` (required): Your Telegram Bot API token
- `TELEGRAM_API_ROOT` (optional): Custom API root URL (default: `https://api.telegram.org`)
- `TELEGRAM_ALLOWED_CHATS` (optional): JSON array of allowed chat IDs

## Usage

```python
from elizaos_plugin_telegram import TelegramService, TelegramConfig

# Create configuration
config = TelegramConfig.from_env()

# Initialize service
service = TelegramService(config)

# Start the bot
await service.start()
```

## Event Types

The plugin emits the following event types:

- `TELEGRAM_WORLD_JOINED` - Bot joined a new chat
- `TELEGRAM_WORLD_CONNECTED` - Bot connected to existing chat
- `TELEGRAM_WORLD_LEFT` - Bot left a chat
- `TELEGRAM_ENTITY_JOINED` - User joined a chat
- `TELEGRAM_ENTITY_LEFT` - User left a chat
- `TELEGRAM_ENTITY_UPDATED` - User information updated
- `TELEGRAM_MESSAGE_RECEIVED` - Message received
- `TELEGRAM_MESSAGE_SENT` - Message sent
- `TELEGRAM_REACTION_RECEIVED` - Reaction received
- `TELEGRAM_SLASH_START` - /start command received

## Development

```bash
# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Type checking
mypy elizaos_plugin_telegram

# Linting
ruff check elizaos_plugin_telegram
ruff format elizaos_plugin_telegram
```

## License

MIT
