TE

telegram

Open Source CommunicationSocial

Interact with Telegram via Bot API or connect personal accounts through mautrix-telegram Matrix bridge

telegram bot messaging mautrix matrix bridge

Quick Install

npm install @openpets/telegram
pnpm add @openpets/telegram

Example Queries

check telegram bot status
get recent telegram messages
send a telegram message to chat 123456
check bridge connection status
login to telegram with phone number
initialize telegram bridge in docker
start telegram bridge container
check telegram docker status
view telegram bridge logs

Usage Scenarios

bot test

  1. 1 check telegram bot status
  2. 2 get recent telegram messages

bridge test

  1. 1 check bridge connection status
  2. 2 list telegram chats via bridge

docker setup

  1. 1 initialize telegram bridge in docker
  2. 2 check telegram docker status
  3. 3 start telegram bridge container

Optional Configuration

Variable Description
TELEGRAM_BOT_TOKEN Telegram Bot Token from @BotFather - enables Bot API features
TELEGRAM_ENABLE_POSTING Set to 'true' to enable sending messages (disabled by default for safety)
MAUTRIX_BRIDGE_URL URL of your mautrix-telegram bridge instance (e.g., https://telegram-bridge.example.com). Enables Matrix bridge integration for personal accounts.
MAUTRIX_SHARED_SECRET Shared secret for mautrix-telegram provisioning API. Found in bridge config under provisioning.shared_secret
MAUTRIX_DATA_DIR Directory for mautrix-telegram Docker data (default: ~/.mautrix/telegram)
MAUTRIX_IMAGE_TAG Docker image tag for mautrix-telegram (default: 'latest')

Use telegram with Your AI Assistant

This open source plugin works with OpenCode-compatible AI assistants including ChatGPT, Claude, Perplexity, and other LLM-powered coding tools. Install the plugin and start using natural language to interact with telegram.

Works with ChatGPT Works with Claude Works with Perplexity MCP Compatible