Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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

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

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

# 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

Metadata

Release files for elizaos-plugin-telegram 2.0.0a5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for elizaos-plugin-telegram 2.0.0a5
File Size Uploaded
elizaos_plugin_telegram-2.0.0a5.tar.gz 13.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for elizaos-plugin-telegram 2.0.0a5
File Interpreter ABI Platform
elizaos_plugin_telegram-2.0.0a5-py3-none-any.whl Python 3 none any Details

Total release size: 27.8 kB

Release files / elizaos_plugin_telegram-2.0.0a5.tar.gz

Download URL elizaos_plugin_telegram-2.0.0a5.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a9bbd04dc82a30e1b2ec480d25ee7eb641f9bea2315b440a54fdb86903301a8d
BLAKE2b-256 checksum
How to use checksums
ed2b39f7ebfe2cdbb0f80d090cbb4cd5665e219839ba9c47f2a7fc4adbc3bb8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / elizaos_plugin_telegram-2.0.0a5-py3-none-any.whl

Download URL elizaos_plugin_telegram-2.0.0a5-py3-none-any.whl
Size 14.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b4e1527ee0c2a6c7d733a8b4a930a56bdec9ce3ccec1562206024ef4e37a9d71
BLAKE2b-256 checksum
How to use checksums
8186876c3d1cb48210f5775ba662e6d2495783a993f07c1835da0cbcd16d77fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

2.0.0a5 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page